VM:Webgateway Web Server
Select where you want to go:

Reference -
Directory Control Records

Introduction to Directory Control Records
Comment
DIR
FILE
For Minidisks, CMS Search Order, and SFS Directories
For BFS Directories
INDEX
Sample DIRMAP File

FILE Record for BFS Directories


Record Syntax | How to Specify FILE Records

Record Syntax

FILE urltoken BFSname BFSext [content_filetype2]
urltoken
File identification that web browser users must specify in URLs to have VM:Webgateway display BFSname.BFSext on their browsers. You can express urltoken as:

  • name.extension[.content_filetype1]
  • name
  • string

The name, extension, and string parameters must use valid BFS characters. If you use the characters * and %, VM:Webgateway will interpret them as pattern matching characters. You can never include the following characters in urltoken because they are invalid in URLs:
blank semicolon (;)
question mark (?) colon (:)
at sign (@) ampersand (&)
equal sign (=) plus sign (+)
slash (/)  

Be aware that, because BFS is a case-sensitive file system, the character case the web browser uses in the file identification part of a URL must match exactly the character case you specify for urltoken on the FILE record. Any discrepancy in cases will prevent VM:Webgateway from matching the file identification to urltoken.

BFSname BFSext
Identifies the BFS file VM:Webgateway is to serve on the user's browser when the user idenfifies a file that matches urltoken. VM:Webgateway joins BFSname and BFSext with a period and looks for BFSname.BFSext in BFS.

You cannot use pattern matching in either BFSname or BFSext because VM:Webgateway interprets * and % as valid BFS characters. Because BFS is a case-sensitive file system, the character case you specify here must exactly match the character case used in the file name in the BFS directory.

[content_filetype]
VM:Webgateway content filetype to associate with BFSname BFSext. The content filetype you specify must already be defined in VM:Webgateway. You can use the QUERY FILETYPE command to display a list of existing content filetypes.

If you specify content_filetype1, you must also specify content_filetype2. If you do not specify either parameter, VM:Webgateway checks whether BFSext exists as a content filetype. (This check is case insensitive.) If BFSext exists as a content filetype, VM:Webgateway uses the file characteristics of that filetype. If BFSext does not exist as a content filetype, VM:Webgateway assumes these file characteristics:

Type: static file
Content Type: text/plain
Translation: USENGLISH
SSI: NO
Filter: NONE

How to Specify FILE Records

The values you specify on the FILE record depend on how you want web browser users to identify files in URLs. As explained earlier, you can express urltoken as name.extension[.content_filetype1], name, or string.

When urltoken is name.extension[.content_filetype1]

FILE name.extension[.content_filetype1] ...
  ... {BFSname|=} {BFSext|=} [content_filetype2|=]

If you want to use name for BFSname, specify = for BFSname. If you want to override name, specify a different value for BFSname. Use this method for BFSext and extension as well.

When you allow pattern matching in name, you must specify = for BFSname. The same is true for extension and BFSext.

When you allow content_filetype1, you must specify content_filetype2. If you want to use content_filetype1, specify = for content_filetype2; VM:Webgateway will interpret the last segment of urltoken as the the content type. If you want to override content_filetype1, specify a different value for content_filetype2.

Examples

The VMWEBSRV.DIRMAP file in userid HECTOR's user page includes these records:

FILE HOME*.HTML HomePage =
FILE homepage.html HomePage =
FILE resume.doc resume html PARSE
FILE unix.chars.html ?@&+ html
FILE a.b.c.html.book2htm a.&b.&c = =

When a user enters URL http://www.company.com/~hector/HOME.PAGE.HTML or http://www.company.com/~hector/HOMEPAGE.HTML, VM:Webgateway finds the first record and serves the HomePage.HTML file.

When a user enters URL http://www.company.com/~hector/homepage.html, VM:Webgateway finds the second record and serves the HomePage.html file.

When a user enters URL http://www.company.com/~hector/hoMepaGe.html, VM:Webgateway does not find a matching record and serves an error document.

When a user enters URL http://www.company.com/~hector/resume.doc, VM:Webgateway finds the third record and serves the resume.html file, using file characteristics associated with content filetype PARSE.

When a user enters URL http://www.company.com/~hector/unix.chars.html, VM:Webgateway finds the fourth record and serves the ?@&+.html file.

When a user enters URL http://www.company.com/~hector/a.b.c.html.book2htm, VM:Webgateway finds the fifth record and serves the a.&b.&c.html file, using the file characteristics associated with content filetype BOOK2HTM.

When urltoken is name

FILE name {BFSname|=} BFSext [content_filetype]

If you want to use name for BFSname, specify = for BFSname. If you want to override name, specify a different value for BFSname.

When you allow pattern matching in name, you must specify = for BFSname. You cannot specify = for BFSext.

Examples

The VMWEBSRV.DIRMAP file in userid HECTOR's user page includes these records:

FILE HomePage HECTOR HTML
FILE home* homepage html
FILE sometext = HTML TEXTHTML
FILE unix.chars.html chars@;#& parse

When a user enters URL http://www.company.com/~hector/HomePage, VM:Webgateway finds the first record and serves the HECTOR.HTML file.

When a user enters URL http://www.company.com/~hector/home123, VM:Webgateway finds the second record and serves the homepage.html file.

When a user enters URL http://www.company.com/~hector/sometext, VM:Webgateway finds the third record and serves the sometext.HTML file, using the file characteristics specified for content filetype TEXTHTML.

When a user enters URL http://www.company.com/~hector/unix.chars.html, VM:Webgateway finds the fourth record and serves the chars@;#&.parse file. PARSE exists as a content filetype in the VM:Webgateway database, so VM:Webgateway uses the file characteristics specified for content filetype PARSE.

When urltoken is string

FILE string BFSname BFSext [content_filetype]
Example

The VMWEBSRV DIRMAP file in userid HECTOR's user page includes this record:

FILE CompanyHomePg @company html+ translte

When a user enters URL http://www.company.com/CompanyHomePg, VM:Webgateway serves the @company.html+ file, using the file characteristics associated with content filetype TRANSLTE.

When a user enters URL http://www.company.com/companyhomepg, VM:Webgateway does not find a matching record and serves an error document.


Top
Select where you want to go:

Copyright © 1998, Sterling Software, Inc.