Advertising banner:
 
 
 A160
 
81203_43854_21.png81203_43840_19.png



Creating and editing the Aliases document
Use the Aliases document to run different scripts from your web server while hiding the paths from users.
The purpose of the Aliases document is to:
•       install a CGI written for a different web server (for example a CGI written for an Apache server) where you don’t have access to the CGI source files or they are too complex to modify
        For example:
•       if a CGI is written in a programming language, such as C or C++ and you only have the executable (.exe) file
•       if a CGI is written in Perl and you are not a Perl programmer.
•       trigger CGIs and hide them behind virtual names
This allows you to hide the source of the CGI and even the fact that you are running CGIs on your system. For an example, see Hiding a CGI path on a web page.
•       hide or change URLs.
This allows you to change the name of a publicly accessible conference on your FirstClass system. You may want to provide an alias of the old name to the new name, for people who have bookmarks or to support requests made through search engines. For an example, see Changing a URL to a publicly accessible conference.
The Aliases document is not a standard item on your system; you must create it in the Internet Services folder on the administrator’s Desktop.
30042004_113143_0.png



Basic Aliases document syntax
The basic syntax of each line in the Aliases document is:
keyword website URLpattern URLreplacement
where,
keyword         is the word that begins the code line (for example, ScriptAliasMatch or Alias)
website         is either * to indicate all web sites (or the only site if the Multiple Sites & Languages form is not used), or a web site alias optionally followed by a period and a language
URLpattern      describes the URL to match (depending on the keyword)
URLreplacement  substitutes (internally) for the requested URL if the pattern matches
In all cases, the link in the browser will show the URLpattern, and navigate to the URLreplacement.
        Note
Both URLpattern and URLreplacement are case sensitive (and are regular expressions for AliasMatch and ScriptAliasMatch).
Code lines can start with either the ScriptAlias or ScriptAliasMatch keyword, to trigger CGI processing and Alias and AliasMatch keywords for all other HTTP requests.
        Note
URLpattern must be enclosed in double quotes (") if it contains spaces or one or more of the following characters:
        < > " # { } | \ ^ [ ] ' ` +

In addition, the characters for double quote (") and backslash (\) must be preceded by a backslash (\).

For example,

/URL with " double quote and \ backslash/

would be inserted in URLpattern as

"/URL with \" double quote and \\ backslash/"



Aliases document examples
The following are examples of:
•       triggering CGIs and hiding them behind virtual names
•       hiding or changing URLs.
Hiding a CGI path on a web page
In the section Creating CGIs, we placed a CGI on the Husky Planes web site. Now, we are going to provide an alias to the same CGI executable in the Aliases document.
To create an alias to a CGI executable:
1       Create an Aliases document in the Internet Services folder containing the following code:
        Note
The following code must be entered on one line.
        ScriptAliasMatch * /[Ll]inks/ /cgi-bin/rand_link/rand_link.pl/arguments
        where,
        [Ll]inks        is the regular expression to match the link name: Links or links
        rand_link       is the name of the CGI folder in the cgi-bin folder
        rand_link.pl    is the CGI executable name
        arguments       are any additional arguments required for the CGI executable (if applicable)
        Note
If you don’t need to use regular expressions, use ScriptAlias.
2       Close the document.
3       Do a Reload Config, located on the Control tab of the Internet Services Monitor, to update your changes.
You do not need to restart Internet Services.
When a browser requests the URL /Links (or /links) from your server, the request is changed internally to /cgi-bin/rand_link/rand_link.pl/arguments and the CGI is run as if the requested URL was entered as /cgi-bin/rand_link/rand_link.pl/arguments.
Changing a URL to a publicly accessible conference
You can hide or change URL paths to publicly accessible conferences on your FirstClass system.
For example, on the Husky Planes web site we have a conference called Sold Product Customer Support for the different models of planes we sell. We are now moving to a lease-only model for our company. However, we still want to provide support for our customers who have bought our products in the past. Because of our new business direction, the FirstClass administrator has to move the Sold Product Customer Support conference inside another conference called Old Product Support. Since most customers who require customer support have the original conference URL bookmarked in their browsers, we must ensure they can still reach it without having to change their bookmark.
To solve this problem, Husky Planes’ administrator created an alias of the URL /Sold Product Customer Support to the URL /Old Product Customer Support in the Aliases document. Following the basic Aliases document syntax, keyword website URLpattern URLreplacement, she entered this line in the Aliases document:
AliasMatch * "^/Sold Product Customer Support/" "/Old Product Support/Sold Product Customer Support/"
The above line of code reroutes customers using their old bookmarks to the new location of the conference.



hirosue Shino Web Site