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

System Administrator Tasks - Advanced

Serving Files Using Alias Names
Serving Files from Logical Directories
On a Minidisk
On an SFS Directory
On a BFS Directory
When Using CMS Search Order
Serving CGI Programs
Dynamically Including Information in Files
Creating Clickable Images
Filtering Static Files
Summary of Setting Up Access Control
Determining How to Control Access
Authenticating Web Browser Users
Determining Group Membership
Setting Up Access Control for the Server Root Domain
Setting Up Access Control for All User Pages
Analyzing Your Server Log

Serving Files from Logical Directories on a BFS Directory


Steps | How a URL Relates to Subdirectories and DIRMAP Files |
URLs for Files Served From Logical Directories | When URLs Identify Directories

Steps

  1. Place the DIRMAP files for logical directories on the BFS directory or subdirectory for which you want to create logical directories.


    Note: To determine the file to serve, VM:Webgateway always reads the VMWEBSRV.DIRMAP file first.

  2. Place the files identified in the logical directories on the same BFS directory or subdirectory as the DIRMAP file.

How a URL Relates to Subdirectories and DIRMAP Files

In the following illustration, the files are stored in VM userid DAN's user page:

  • The user page is defined as the directory /../VMBFS:VMSYSU:DAN/WebUserRoot.
  • The subdirectory /../VMBFS:VMSYSU:DAN/WebUserRoot/Sports contains the following DIRMAP structure:
         VMWEBSRV.DIRMAP                 
----------------------
+---- DIR FootBall FootBall
|
+---->FootBall.DIRMAP
--------------------------------
+---- DIR College College
| FILE Overview.Html FtblOver html
| FILE rules.html FtblRule html
|
+---->College.DIRMAP
--------------------------------
FILE changes.html Changes HTML
FILE scores SCORES HTML

Note: In the following example, if the files were stored in the server root domain rather than a user page, the web browser user would omit the ~dan element from the URL.

When mapping a URL to a file, VM:Webgateway first attempts to match a URL element to an entry in a VMWEBSRV.DIRMAP file. If a VMWEBSRV.DIRMAP file does not exist on the current directory or the VMWEBSRV.DIRMAP file does not contain a matching entry, VM:Webgateway looks at the BFS directory structure to find a match.

          +-- No VMWEBSRV.DIRMAP file on       
| /../VMBFS:VMSYSU:DAN/WebUserRoot
| directory; VM:Webgateway finds the
| Sports subdirectory
|
|
| +-- Look for this element
| | in the Sports subdirectory
| |
v v
/~dan/Sports/FootBall/Overview.Html

If the element identifies a subdirectory, VM:Webgateway starts looking for information in the subdirectory. VM:Webgateway first looks for a VMWEBSRV.DIRMAP file in the subdirectory. If a VMWEBSRV.DIRMAP file exists, VM:Webgateway attempts to match the next element to an entry in a VMWEBSRV.DIRMAP file. If a matching entry does not exist, VM:Webgateway looks at the BFS directory structure to find a match.

              +-- Found in the VMWEBSRV.DIRMAP
| file on the current directory;
| switch to FootBall.DIRMAP file
|
| +-- Look for this element
| | in FootBall.DIRMAP
| | file only
| |
v v
/~dan/Sports/FootBall/Overview.Html

If the element identifies an entry in a DIRMAP file, VM:Webgateway looks for the next element in the specified DIRMAP file. The DIRMAP file must be located on the current directory. Once VM:Webgateway finds a match in a DIRMAP file, it only looks in DIRMAP files on the current directory to determine what file to serve. VM:Webgateway no longer matches elements in the URL to BFS directories or files.

                       +-- Found in the       
| FootBall.DIRMAP file
v
/~dan/Sports/FootBall/Overview.Html

URLs for Files Served From Logical Directories

A web browser user views a file by identifying the subdirectories, logical directories, and the file name in the path portion of the URL as described above.

When analyzing the URL to determine what file to serve, VM:Webgateway performs a case sensitive match when comparing each element in the URL to:

As a result, for VM:Webgateway to serve a file, the URL from the the web browser must use the exact case you specify on the urltoken of a DIRMAP record or the exact case you used when naming each BFS directory and the file.

If VM:Webgateway uses a FILE record to determine the file to serve, it forms the BFS file name by joining the values specified in the filename and filetype parameters with a period. VM:Webgateway performs a case sensitive search to find the file on a BFS directory. For example, for the following FILE record, VM:Webgateway looks for the BFS file FunStuf.HtMl on a BFS directory:

FILE funstuff.html FunStuf HtMl

Examples

In the following examples, the files are stored in VM userid DAN's user page. The user page is defined as the directory /../VMBFS:VMSYSU:WEBROOTS/DanUserRoot/. The subdirectory /../VMBFS:VMSYSU:WEBROOTS/DanUserRoot/Sports contains the DIRMAP structure displayed above.

  • To view the file FtblRule.html in the FootBall logical directory on the Sports subdirectory, enter the following URL:

    http://comp.com/~dan/Sports/FootBall/rules.html

  • To view the file SCORES.HTML in the College logical directory on the Sports subdirectory, enter the following URL:

    http://comp.com/~dan/Sports/FootBall/College/scores

When URLs Identify Directories

When a web browser user enters a URL that identifies a directory rather than a file, VM:Webgateway generates and serves an automatic directory. The automatic directory contains a list of:

  • Items specified on the FILE and DIR records in the current DIRMAP file, if one exists
  • Files on the current directory that VM:Webgateway can serve
  • Subdirectories of the current directory
VM:Webgateway creates a hyperlink to each item in the list to allow a web browser user to easily select and view an item.

Examples

The following examples use the DIRMAP structure displayed above.

  • A web browser user enters the following URL:

    http://comp.com/~dan/

    VM:Webgateway serves an automatic directory containing a list of all the files and subdirectories contained on the directory /../VMBFS:VMSYSU:DAN/WebUserRoot.

  • A web browser user enters the following URL:

    http://comp.com/~dan/Sports/

    VM:Webgateway serves an automatic directory containing a list of all the files and subdirectories contained on the directory /../VMBFS:VMSYSU:DAN/WebUserRoot/Sports. In addition, the list contains the items in the VMWEBSRV.DIRMAP file:

     Dir: FootBall 

  • A web browser user enters the following URL:

    http://comp.com/~dan/Sports/FootBall/

    VM:Webgateway serves an automatic directory containing a list of all the files and subdirectories contained on the directory /../VMBFS:VMSYSU:DAN/WebUserRoot/Sports. In addition, the list contains the items in the FootBall.DIRMAP file:

     Dir: College          
    File: Overview.Html
    File: rules.html

  • A web browser user enters the following URL:

    http://comp.com/~dan/Sports/FootBall/College/

    VM:Webgateway serves an automatic directory containing a list of all the files and subdirectories contained on the directory /../VMBFS:VMSYSU:DAN/WebUserRoot/Sports. In addition, the list contains the items in the College.DIRMAP file:

     File: changes.html   
    File: scores


Note: To prevent VM:Webgateway from generating and serving an automatic directory, define a file you want VM:Webgateway to display when a URL identifies a directory.


Top
Select where you want to go:

Copyright © 1998, Sterling Software, Inc.