## ScriptAliasMatch

Syntax: ScriptAliasMatch regex directory-filename
Context: server config, virtual host
Status: Base
Module: mod_alias
Compatibility: Available in Apache 1.3 and later

This directive is equivalent to ScriptAlias, but makes use of standard regular expressions, instead of simple prefix matching. The supplied regular expression is matched against the URL, and if it matches, the server will substitute any parenthesized matches into the given string and use it as a filename. For example, to activate the standard `/cgi-bin`, one might use:

        ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1