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

DIR Record


Record Syntax | How VM:Webgateway Processes DIR Records | Examples

The DIR directory control record points to another DIRMAP file. Use the DIR record to create a logical directory structure.

Record Syntax

DIR urltoken filename
urltoken
Token VM:Webgateway matches against an element in the path portion of a URL. There is no restriction on the length of urltoken. You cannot use pattern matching.

To address files that use this DIRMAP file, web browser users need to specify urltoken in a URL. Do not use the following characters in urltoken because they will cause the URL to be invalid:

blank semicolon (;)
question mark (?) colon (:)
at sign (@) ampersand (&)
equal sign (=) plus sign (+)
slash (/)
 
filename
Filename of a DIRMAP file.

For a DIRMAP file on a mindisk or SFS directory:
Specify a filename of the DIRMAP file. The filetype of the file must be DIRMAP.

For a DIRMAP file on a BFS directory:
Specify a value for filename that allows VM:Webgateway to form the name of the DIRMAP file. VM:Webgateway forms the BFS file name by joining the filename with the extension .DIRMAP.

The value for filename is case sensitive. VM:Webgateway looks for a file with a BFS file name that has the exact case specified in filename and the uppercase extension .DIRMAP.


Note: A DIRMAP file can contain 0 or more DIR records. If an element in the path matches more than one DIR record in a DIRMAP file, VM:Webgateway uses the first record to match. If an element in the path matches both a DIR record and a FILE record, VM:Webgateway uses the first record to match.


How VM:Webgateway Processes DIR Records

When determining what file to serve based on the path portion of the URL, VM:Webgateway matches elements in the URL to urltoken. If it finds a match, VM:Webgateway reads the DIRMAP file identified by filename to match the next element of the URL.

If you are serving files from a BFS directory, VM:Webgateway performs a case sensitive match when comparing elements in the URL to urltoken. As a result, for web browser users to obtain files that are served from a BFS directory, they must specify the URL using the exact case you use in urltoken.

Example

A web browser user enters the following URL:

http://www.company.com/~leanna/project_A/sum.html

VM:Webgateway receives the following part of the URL:

~leanna/project_A/sum.html

VM:Webgateway uses the ~leanna element of the URL path to determine that the data resides in the userid LEANNA's user page. VM:Webgateway reads the VMWEBSRV DIRMAP file (for BFS, VMWEBSRV.DIRMAP) in the user page. The following DIR record in the VMWEBSRV DIRMAP file indicates that VM:Webgateway needs to read the PROJA DIRMAP (for BFS, PROJA.DIRMAP) file to determine the file to serve:

DIR project_A PROJA

Examples

  • You are serving files from a minidisk. The VMWEBSRV DIRMAP file contains the following record:

    DIR SIDE SIDE

    VM:Webgateway uses the SIDE DIRMAP file to locate the file RICE GIF when a user enters the following URL:

    http://www.company.com/side/rice.gif

  • You are serving files from a BFS directory. The VMWEBSRV.DIRMAP file contains the following record:

    DIR SideDishes side

    VM:Webgateway uses the side.DIRMAP file to locate the file rice.GIF when a user enters the following URL:

    http://www.company.com/SideDishes/rice.GIF


Top
Select where you want to go:

Copyright © 1998, Sterling Software, Inc.