Help - Alias Editor | ||
---|---|---|
Introduction |
Aliases map a URL to a resource and its location. The ordering of rules in the Alias Rule Editor table is not important unless you are using cascaded rules, which are an advanced feature, explained below.
Default File Location
The Default location of files is the Document Root, which is automatically
configured upon installation.
You only need to create Aliases for files outside of the Document Root and its sub-directories, because all files within the Document Root are by default accessible.
Default Mapping
The Default mapping for a URL is to the file of the same name
within the Document Root directory.
Directories outside of the Document Root
If the URL uses a directory outside of the Document Root,
then the URL is aliased to the file of the same name within that directory.
Sub-Directories
If the URL includes a sub-directory,
then the URL is mapped to the file of the same name within that sub-directory.
Mapping Root
Mapping Roots are used to make URLs virtual, so that you can change
your Document Root or Server Root directory
without ever needing to modify your HTML documents or any of your Alias Rules.
The Mapping Root defines the physical resource location on the server. The "New Path" is always a sub-directory or a file within the Mapping Root directory.
If the "New Path" is "/bin/" and the "Mapping Root" is "Server" with a Server Root directory of "r:\powerweb", then the physical location will be "r:\powerweb\bin\". You use the Directory Tree to point your browser at the name of the directory you want to access outside of the Document Root. The Resource Editor Wizard will create a Resource for that directory, and map a URL to that Resource by creating an Alias Rule. You use the Directory Tree to point your browser at the drive name and then the name of the directory you want to access. The Resource Editor Wizard will create a Resource for that directory, and map a URL to that Resource by creating an Alias Rule. Aliases can used to map URLs to a different server through redirection. This can be used to dynamically divide a document tree among two or more servers by automatically redirecting users to another server when accessing specified documents.When your server has grown beyond its current hardware limitations, you can sub-divide its load among multiple servers without any of your users being affected or even aware of the change.
When a user accesses the URL "/CompuSource/index.htm", the Rule below will transparently redirect that user to "http://www.compusource.co.za/index.htm".Add a new URL Alias Rule to the table as follows:
Field Name Example Values Explanation Alias Name CompuSource Enter a unique descriptive name. Original Path /CompuSource/ The unique URL to access it with. New Path http://www.compusource.co.za/ The server to access with that URL. Mapping Root None Always "None" Object Type Redirect Always "Redirect" Continue If Rule Matches No Always "No"
Config:/Security/Alias/*/ | ||||
---|---|---|---|---|
Setting | Explanation | Default / Example | Data Type | Access R,W,A,D |
Alias Name | The alias name can be any unique name you wish to give this rule. It has no effect on rule processing. | |||
Original Path | A match occurs when the prefix of the virtual resource matches this variable. No wildcards are allowed. | Text | R,W | |
New Path |
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 | |
Mapping Root | This specifies the directory to use when mapping the original virtual resource into a physical file name. If the new path is not an absolute path (including a drive letter specification), then it is assumed to be contained within the directory specified here. The choices are "server" (for the overall Server Root directory), "system" (for the System directory within the overall Server Root directory), "document" (for the Document Root directory for the service such as HTTP), and "none" (for directories outside of the main directory tree). | none | 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 |
Continue If Rule Matches |
No more attempts are made to match the virtual resource against subsequent
alias rules if this variable is set to "No". Its default is "Yes", meaning
that cascaded sequences of name translations are allowed.
| Yes | Integer | R,W |
Advanced Aliasing Rules |
The mapping of a URL to a Resource is defined by each of the Alias Rules in the table. These Rules are processed sequentially until a matched rule is reached with "Continue If Rule Matches" set to "No".
Aliases can continue processing and re-map themselves to yet other aliases by setting "Continue If Rule Matches" to "Yes".Cascaded rules can be used to direct multiple URLs to the same Resource location, excluding some sub-directories.
Assume the following table of URL Alias rules:
Original
PathNew
PathMapping
RootObject
TypeContinue
If Rule
Matches/sql/database/ /data/ Server API Script Yes /oodbms/database/ /data/ Server API Script Yes /data/internal/ w:/CompanyData/ None API Script No /data/external/ j:/PublicData/ None API Script No
In this example, this is how the following URLs will be mapped to Resources, assuming a Server Root of "r:\powerweb":
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. These aliases are all mapped via the "system" mapping root to ensure that they are accessible across upgrades of the software.
URL Resource /sql/database/internal/Revenue w:/CompanyData/Revenue /sql/database/external/Products j:/PublicData/Products /sql/database/PressReleases r:/powerweb/data/PressReleases /oodbms/database/external/Diagrams j:/PublicData/Diagrams