26.3 MappingWhen a browser requests a URL, the WebSite server first compares the URL to several Web server mapping tables to see how the URL should be translated on your web. For example, a URL may be mapped to a physical location on your computer or one halfway around the world, or it may be mapped to a CGI program that creates a virtual document. The WebSite server supports three types of mapping:
Each of these mappings is controlled by the Mapping page of Server Admin, shown in The List Selector box lists the different types of mappings available. By selecting one from the list, the current mappings are displayed in the top window. You can add, change, or delete mapping values using the two edit boxes and Delete, Replace, and Add buttons in the lower right corner of the page. When you select a value to change it, edit the value in the second box only. If you change the value in the first box, you are actually creating a new value to be mapped. After you have made all the changes to the mapping type, press Apply. You may then select another mapping type to modify or update the WebSite server by pressing Close. Document mappingDocument mapping lets you assign the logical pieces of your web (as defined by URLs) to physical locations on your computer or any other computer on your network. The WebSite default document mappings are shown in
The document root (/) must be a full path name (including drive letter) or a path relative to the server root (displayed on the General page of Server Admin). Other mappings must be full path names or paths relative to the document root. It is suggested that you use full path names for all mappings to avoid confusion. Redirect mappingThis mapping type maps a URL on your web to another URL, usually on another computer. When the server receives a request for a redirected URL, it automatically sends the browser to the new URL. The redirection is transparent to the user. The original URL must be a URL path for your server. The redirected URL must be a full URL (including protocol and/or hostname and path) if it is on another computer. CGI mappingThere are three types of CGI mapping in WebSite, one for each of the types of CGI programs WebSite supports: Windows CGI, Standard CGI, and DOS CGI. CGI mapping identifies URLs that require the browser to execute a program instead of sending a document, and the type and location of the program. CGI mappings must use full path names or paths relative to the server root. Mappings must not fall within either a document-mapped directory tree or the tree mapped for another CGI type. See Chapter 9, CGI Overview, for more information on CGI. See Chapter 14, Windows CGI, for information particular to the Windows CGI. Content Type mappingThis mapping selection displays the mappings of file extensions to content types or MIME types. The server returns the content type of a requested file as header information in its response to the browser. Since WebSite runs under Windows 95 and Windows NT, file extensions can be any number of characters. Multiple extensions often indicate the same file type, such as .html and .html for text/html files. When adding new content types with multiple extensions, each extension must be mapped to the content type separately. You cannot map extensions more than one at a time. WebSite includes about 50 predefined content types and their mappings. There are five standard types included: text, image, video, audio, and application. One type special to the WebSite server is also included: wwwserver. Six subtypes exist for wwwserver; three map to the three kinds of CGI programs, and the others to special files. The CGI subtypes allow you to include CGI programs in your document trees and let the server know that it should execute them when requested. The wwwserver subtypes are described as follows:
Directory Icon MappingThis section of the mapping page is used to map icons to file types for use in directory indexing. The icons are placed to the left of filenames in enhanced directory indexes. Settings for how directory indexes are displayed are available from the Dir Index page of Server Admin. WebSite includes many default icon mappings. Icon files are GIF images that are stored in the directory /WebSite/icons. New icon files that you create should be placed there. Directory index icons can be mapped to files either by content type, i.e., images/*, which covers all image subtypes, or by specific subtypes. A specific subtype mapping will be used over a more general content type mapping. |
|