diff options
author | Alexei Kosut <akosut@apache.org> | 1997-07-08 06:45:24 +0200 |
---|---|---|
committer | Alexei Kosut <akosut@apache.org> | 1997-07-08 06:45:24 +0200 |
commit | 20e17b7d1354847ca134605b2c1641775454d56f (patch) | |
tree | eda3ed52c0b5cc03245e27caba7a0f184f51038e /docs/manual/mod/mod_alias.html | |
parent | The AccessFileName directive can now take more than one file. (diff) | |
download | apache2-20e17b7d1354847ca134605b2c1641775454d56f.tar.xz apache2-20e17b7d1354847ca134605b2c1641775454d56f.zip |
Enable regex support in mod_alias with AliasMatch, ScriptAliasMatch and
RedirectMatch directives.
New syntax for regex support in http_core: <DirectoryMatch>,
<FilesMatch>, <LocationMatch> sections.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@78559 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_alias.html')
-rw-r--r-- | docs/manual/mod/mod_alias.html | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/docs/manual/mod/mod_alias.html b/docs/manual/mod/mod_alias.html index 445c5942f0..484c2b8352 100644 --- a/docs/manual/mod/mod_alias.html +++ b/docs/manual/mod/mod_alias.html @@ -24,10 +24,13 @@ host filesystem in the the document tree, and for URL redirection. <H2>Directives</H2> <UL> <li><A HREF="#alias">Alias</A> +<li><A HREF="#aliasmatch">AliasMatch</A> <li><A HREF="#redirect">Redirect</A> +<li><A HREF="#redirectmatch">RedirectMatch</A> <li><A HREF="#redirecttemp">RedirectTemp</A> <li><A HREF="#redirectperm">RedirectPermanent</A> <li><A HREF="#scriptalias">ScriptAlias</A> +<li><A HREF="#scriptaliasmatch">ScriptAliasMatch</A> </UL> <hr> @@ -64,6 +67,28 @@ See also <A HREF="#scriptalias">ScriptAlias</A>. </p> <hr> +<h2><A name="aliasmatch">AliasMatch</A></h2> +<P> +<strong>Syntax:</strong> AliasMatch <em>regex directory-filename</em><br> +<Strong>Context:</strong> server config, virtual host<br> +<strong>Status:</strong> Base<br> +<strong>Module:</strong> mod_alias<br> +<strong>Compatibility:</strong> Available in Apache 1.3 and later +</P> + +<p>This directive is equivilent to <a href="#alias">Alias</a>, 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 <code>/icons</code> directory, one might use: +<pre> + AliasMatch ^/icons(.*) /usr/local/etc/httpd/icons$1 +</pre> +</p> + +<hr> + <h2><A name="redirect">Redirect directive</A></h2> <P> <!--%plaintext <?INDEX {\tt Redirect} directive> --> @@ -128,6 +153,29 @@ the function <code>send_error_response</code> in http_protocol.c). </P> <HR> +<h2><A name="redirectmatch">RedirectMatch</A></h2> +<P> +<strong>Syntax:</strong> RedirectMatch [<em>status</em> <em>regex url</em><br> +<Strong>Context:</strong> server config, virtual host<br> +<strong>Status:</strong> Base<br> +<strong>Module:</strong> mod_alias<br> +<strong>Compatibility:</strong> Available in Apache 1.3 and later +</P> + +<p>This directive is equivilent to <a href="#alias">Redirect</a>, 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 redirect all GIF files to like-named JPEG files on another server, +one might use: +<pre> + RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg +</pre> +</p> + +<hr> + <h2><A name="redirecttemp">RedirectTemp directive</A></h2> <P> <!--%plaintext <?INDEX {\tt Redirect} directive> --> @@ -182,6 +230,28 @@ A request for http://myserver/cgi-bin/foo would cause the server to run the script /web/cgi-bin/foo. </P> +<hr> + +<h2><A name="scriptaliasmatch">ScriptAliasMatch</A></h2> +<P> +<strong>Syntax:</strong> ScriptAliasMatch <em>regex directory-filename</em><br> +<Strong>Context:</strong> server config, virtual host<br> +<strong>Status:</strong> Base<br> +<strong>Module:</strong> mod_alias<br> +<strong>Compatibility:</strong> Available in Apache 1.3 and later +</P> + +<p>This directive is equivilent to <a href="#scriptalias">ScriptAlias</a>, 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 <code>/cgi-bin</code>, one might use: +<pre> + ScriptAlias ^/cgi-bin(.*) /usr/local/etc/httpd/cgi-bin$1 +</pre> +</p> + <!--#include virtual="footer.html" --> </BODY> </HTML> |