Hitachi

Hitachi Application Server V10 Definition Reference Guide (For UNIX® Systems)


2.3.127 ScriptAliasMatch

ScriptAliasMatch specifies a regular expression that indicates the URL for executing a CGI program, and the name of the directory where the CGI program is located.

Description

ScriptAliasMatch executes the CGI program in the specified new path when the URL of a request of the executing the CGI program that was specified from the web browser meets the conditions specified by the regular expression. When the regular expression in regular_expression is surrounded by parentheses (()), you can specify $n (where n is a number from 1 to 9) which indicate the character string matching the nth regular expression in the regular_expression. For example, $1 indicates the first group, and $2 indicates the second group.

Specify the new path as an absolute path. In addition, if you want to include a dollar sign ($) or an ampersand (&) in the new path, add a backslash (\) before that character. Note that you do not need to add a backslash before the dollar sign when specifying $i.

A regular expression that is the same as the following directive value cannot be specified.

For example, the following specification is not possible:

ScriptAliasMatch ^/aaa/bbb/(.*) C:/alias/$1
ProxyPass /aaa/ http://aaa.example.com/

Syntax

ScriptAliasMatch regular_expression new_path

Locations where it can be written

httpsd.conf and <VirtualHost>

Example

ScriptAliasMatch ^/cgi-bin/(.*)
 "installation_directory_for_Application_Server/httpsd/cgi-bin/$1"