Apache Reference: mod_alias, AliasMatch
AliasMatch
Map a URL to a File Name Path via Regular Expression Match
Syntax: AliasMatch url-pattern A
Example: AliasMatch ^(.+\.(gif))$ /www/$2/$1
Since: Apache 1.3
This directive is equivalent to Alias, but uses standard regular expressions, instead of simple prefix matching. The supplied regular expression url-pattern is compared with the request URL. If it matches, the server will substitute any matches found in parentheses in fs-path into the given string and use it as a file system path. For instance, in the preceding example, a request for http://host/foo/bar.gif would cause the server to return the file F.