![Netscape ENTERPRISE SERVER 6.1 Manual Download Page 29](http://html1.mh-extra.com/html/netscape/enterprise-server-6-1/enterprise-server-6-1_manual_1674653029.webp)
Server Instructions in obj.conf
Chapter
2
Syntax and Use of obj.conf
29
•
NameTrans
Translates the URL specified in the request from a logical URL to a physical file
system path for the requested resource. This may also result in redirection to
another site. For example:
NameTrans fn="document-root" root="D:/Netscape/Servers/docs"
This example calls the
document-root
function with a
root
argument of
D:/Netscape/Servers/docs
. The function
document-root
function translates
the
http://
server_name
/
part of the requested to URL to the document root,
which in this case is
D:/Netscape/Servers/docs
. Thus a request for
http://
server-name
/doc1.html
is translated to
D:/Netscape/Servers/docs/doc1.html
.
•
PathCheck
Performs tests on the physical path determined by the
NameTrans
step. In
general, these tests determine whether the path is valid and whether the client
is allowed to access the requested resource. For example:
PathCheck fn="find-index" index-names="index.html,home.html"
This example calls the
find-index
function with an
index-names
argument of
index.html,home.html
. If the requested URL is a directory, this function
instructs the server to look for a file called either
index.html
or
home.html
in
the requested directory.
•
ObjectType
Determines the MIME (Multi-purpose Internet Mail Encoding) type of the
requested resource. The MIME type has attributes
type
(which indicates
content type),
encoding
and
language
. The MIME type is sent in the headers
of the response to the client. The MIME type also helps determine which
Service
directive the server should execute.
The resulting type may be:
❍
A common document type such as
text/html
or
image/gif
(for example,
the file name extension
.gif
translates to the MIME type
image/gif
).
❍
An internal server type. Internal types always begin with
magnus-internal.
For example:
ObjectType fn="type-by-extension"
This example calls the
type-by-extension
function which causes the server to
determine the MIME type according to the requested resource’s file extension.
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...