| |  | Serving Files Using Alias Names Summary of Steps | Steps in Detail To allow web browser users to specify a file using an alias name in a URL, specify the alias name for the urltoken parameter on a FILE directory control record. To allow web browser users to specify a file using an alias name for a directory level in a URL, specify the alias name for the urltoken parameter on a DIR directory control record. - To allow web browser users to specify a file using an alias name in a URL, specify the alias name for the urltoken parameter on a FILE directory control record.
The format of the FILE record is: FILE urltoken filename filetype [content_filetype] You can set up your DIRMAP file to allow a web browser user to identify a file by: - Filename only
- Filename and filetype different from the actual filename and filetype
- Arbitrary character string
Note: If you serve data from an SFS directory and do not currently use DIRMAP files, create a VMWEBSRV DIRMAP file on the directory that contains the file you want to create an alias name for. For a BFS directory, create a VMWEBSRV.DIRMAP file on the directory that contains the file you want to create an alias name for. Examples - The VM user with the userid LINDSAY serves file from a minidisk. To identify the file HOMEPAGE HTML by the filename only, place the following FILE record in the VMWEBSRV DIRMAP file:
FILE HOMEPAGE HOMEPAGE HTML To view the file, a web browser user enters: http://www.comp.com/~lindsay/homepage - The VM user with userid DAN serves files from the SFS directory VMSYSU:DAN.USERROOT. The subdirectory VMSYSU:DAN.USERROOT.GOALS contains the DAN JANUARY and VMWEBSRV DIRMAP files. To identify the file DAN JANUARY by a different filename and filetype, JAN.RESULTS, place the following FILE record in the VMWEBSRV DIRMAP file:
FILE JAN.RESULTS DAN JANUARY HTML Note: The FILE record specifies the filetype HTML for the content_filetype parameter. This indicates that VM:Webgateway should serve the file using the file characteristics associated with the filetype HTML rather than the file characteristics associated with the filetype JANUARY. To view the file, a web browser user enters: http://www.comp.com/~dan/goals/jan.results - The server root domain is defined as the BFS directory /../VMBFS:VMSYSU:VMWEBSRV/web_root. This directory contains both the file RecipeFile.html and the VMWEBSRV.DIRMAP file. To identify the file RecipeFile.html by the string GoodToEat, place the following FILE record in the VMWEBSRV.DIRMAP file:
FILE GoodToEat RecipeFile html To view the file, a web browser user enters: http://www.comp.com/GoodToEat - To allow web browser users to specify a file using an alias name for a directory level in a URL, specify the alias name for the urltoken parameter on a DIR directory control record.
The format of the DIR record is: DIR urltoken dirmapfilename You can set up your DIRMAP file to allow a web browser user to identify a DIRMAP file in a URL path by: - A name different from the filename of the DIRMAP file
- An arbitrary character string
Examples - The VM user with userid JIM serves files from a minidisk. This user identifies all GIF files in the GIF DIRMAP file. To use the name IMAGES in the URL rather than GIF, use the following DIR record:
DIR IMAGES GIF To view the file APPLE GIF, a web browser user enters: http://www.comp.com/~jim/images/apple.gif - The VM user with userid DAN serves files from the BFS directory /../VMBFS:VMSYSU:DAN/UserRoot. This user identifies video files in the AVIFiles.DIRMAP file. To use the name Videos in the URL rather than AVIFiles, use the following DIR record:
DIR Videos AVIFiles To view the file Circus.AVI, a web browser user enters: http://www.comp.com/~dan/Videos/Circus.AVI - The server root domain is defined as the SFS directory VMSYSU:VMWEBSRV.WEBROOT. Files associated with winter sports are identified in the WINSPORT DIRMAP file. To use the string WINTERSPORT in the URL, use the following DIR record:
DIR WINTERSPORT WINSPORT To view the file HOCKEY HTML, a web brower user enters: http://www.comp.com/wintersport/hockey.html
Note: You can set up the server root domain to serve data from a minidisk, SFS directory, or BFS directory, or to use CMS search order. |