You will most times want to keep all your documents in various sub-directories off of the document root. This allows for easy management and security, and for simplified relocation of the documents to a different drive with minimal impact.
There are occasions however when you will wish to grant access to documents outside of this directory tree. A typical example is CGI programs which are normally kept in a special directory named "CGI-BIN" under the main server directory. With PowerWeb, this directory can be located anywhere. If you don't wish to store all your CGI programs in one directory tree, you can also keep them in your document tree by establishing a MIME type mapping for the relevant files.
PowerWeb uses aliases internally to manage access to its administration, configuration, installation and internal documentation. This approach separates out PowerWeb's own documents from those of your own and simplifies management.
Aliases can also be used to map URLs to a different WWW server. This can be used to dynamically divide a document tree between two or more servers by automatically redirecting users to another server when accessing specified documents. This approach is clearly slower than a simple directory remapping, so only use redirections when you have moved the documents to another file system which is not accessible from the original server.
Processing of aliases continues until no more matches occur between the virtual path and the Original name, or until a matched rule has a Stop variable set to TRUE.
If no matches occur, the virtual resource name is mapped to a physical resource by prefixing it with the document root directory. Its object type is assumed to be a DOCUMENT.
In this example, this is how the following resource names will be translated:Original Alias ObjectType Stop /cgi-bin/ /web/scripts/ CGI FALSE /external/ http://my.other.server/ REDIRECT TRUE /icon/ e:/web/icons/ DOCUMENT FALSE /web/ d:/www/ DOCUMENT FALSE
Virtual Physical /cgi-bin/execute.me d:/www/scripts/execute.me /icon/default.ico e:/web/icons/default.ico /external/home.html http://my.other.server/home.html
Config:/Security/Alias/*/ | ||||
---|---|---|---|---|
Setting | Explanation | Default / Example | Data Type | Access R,W,A,D |
Alias |
If the "ObjectType" is REDIRECT, the value of this variable defines
the new URL of the resource. Note that if the URL is on the same server,
it is far more efficient to use a different "ObjectType" and map
the resource to its new directory. If the "ObjectType" is anything other than REDIRECT, the value of this variable defines the new name of the resource after translation, based on pattern substitution. | Text | R,W | |
ObjectType |
The standard object type for virtual resources matching the rule
specified by the "Original" variable. There is a standardised list of object types. | Unknown | Integer | R,W |
Original | A match occurs when the prefix of the virtual resource matches this variable. No wildcards are allowed. | Text | R,W | |
Stop | No more attempts are made to match the virtual resource against subsequent alias rules if this variable is set to TRUE. Its default is FALSE, meaning that cascaded sequences of name translations are allowed. | No | Integer | R,W |