Loading docs/manual/mod/mod_alias.xml +41 −35 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ Alias "/foo" "/gaq" would always match before the <code>/foo/bar</code> <directive module="mod_alias">Alias</directive>, so the latter directive would be ignored.</p> <p>When the <directive module="mod_alias">Alias</directive>, <directive module="mod_alias">ScriptAlias</directive> and <directive module="mod_alias">Redirect</directive> directives are used Loading Loading @@ -176,18 +177,20 @@ Alias "/image" "/ftp/pub/image" <p>Any number slashes in the <var>URL-path</var> parameter matches any number of slashes in the requested URL-path.</p> <p>If the <directive>Alias</directive> directive is used within a <directive type="section" module="core">Location</directive> or <directive type="section" module="core">LocationMatch</directive> section the URL-path is omitted, and the file-path is interpreted using <a href="../expr.html">expression syntax</a>.</p> using <a href="../expr.html">expression syntax</a>.<br /> This syntax is available in Apache 2.4.19 and later.</p> <highlight language="config"> <Location /image> Alias /ftp/pub/image <Location "/image"> Alias "/ftp/pub/image" </Location> <LocationMatch /error/(?<NUMBER>[0-9]+)> Alias /usr/local/apache/errors/%{env:MATCH_NUMBER}.html <LocationMatch "/error/(?<NUMBER>[0-9]+)"> Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html" </LocationMatch> </highlight> Loading Loading @@ -383,22 +386,24 @@ Redirect "/one" "/two" Redirect permanent "/one" "http://example.com/two" Redirect 303 "/three" "http://example.com/other" </highlight> <p>If the <directive>Redirect</directive> directive is used within a <directive type="section" module="core">Location</directive> or <directive type="section" module="core">LocationMatch</directive> section with the URL-path omitted, then the URL parameter will be interpreted using <a href="../expr.html">expression syntax</a>.</p> interpreted using <a href="../expr.html">expression syntax</a>.<br /> This syntax is available in Apache 2.4.19 and later.</p> <highlight language="config"> <Location /one> Redirect permanent http://example.com/two </Location><br /> <Location /three> Redirect 303 http://example.com/other </Location><br /> <LocationMatch /error/(?<NUMBER>[0-9]+)> Redirect permanent http://example.com/errors/%{env:MATCH_NUMBER}.html </LocationMatch><br /> <Location "/one"> Redirect permanent "http://example.com/two" </Location> <Location "/three"> Redirect 303 "http://example.com/other" </Location> <LocationMatch "/error/(?<NUMBER>[0-9]+)"> Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html" </LocationMatch> </highlight> </usage> Loading Loading @@ -438,7 +443,6 @@ of the current URL</description> See <directive module="mod_alias">AliasMatch</directive> for details.</p> </usage> </directivesynopsis> Loading Loading @@ -544,19 +548,21 @@ ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl" <directive>ScriptAlias</directive> and revealing the source code of the CGI scripts if they are not restricted by a <directive module="core">Directory</directive> section.</note> <p>If the <directive>ScriptAlias</directive> directive is used within a <directive type="section" module="core">Location</directive> or <directive type="section" module="core">LocationMatch</directive> section with the URL-path omitted, then the URL parameter will be interpreted using <a href="../expr.html">expression syntax</a>.</p> interpreted using <a href="../expr.html">expression syntax</a>.<br /> This syntax is available in Apache 2.4.19 and later.</p> <highlight language="config"> <Location /cgi-bin > ScriptAlias /web/cgi-bin/ <Location "/cgi-bin"> ScriptAlias "/web/cgi-bin/" </Location> <LocationMatch /cgi-bin/errors/(?<NUMBER>[0-9]+)> ScriptAlias /web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi </LocationMatch><br /> <LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)"> ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi" </LocationMatch> </highlight> </usage> Loading Loading
docs/manual/mod/mod_alias.xml +41 −35 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ Alias "/foo" "/gaq" would always match before the <code>/foo/bar</code> <directive module="mod_alias">Alias</directive>, so the latter directive would be ignored.</p> <p>When the <directive module="mod_alias">Alias</directive>, <directive module="mod_alias">ScriptAlias</directive> and <directive module="mod_alias">Redirect</directive> directives are used Loading Loading @@ -176,18 +177,20 @@ Alias "/image" "/ftp/pub/image" <p>Any number slashes in the <var>URL-path</var> parameter matches any number of slashes in the requested URL-path.</p> <p>If the <directive>Alias</directive> directive is used within a <directive type="section" module="core">Location</directive> or <directive type="section" module="core">LocationMatch</directive> section the URL-path is omitted, and the file-path is interpreted using <a href="../expr.html">expression syntax</a>.</p> using <a href="../expr.html">expression syntax</a>.<br /> This syntax is available in Apache 2.4.19 and later.</p> <highlight language="config"> <Location /image> Alias /ftp/pub/image <Location "/image"> Alias "/ftp/pub/image" </Location> <LocationMatch /error/(?<NUMBER>[0-9]+)> Alias /usr/local/apache/errors/%{env:MATCH_NUMBER}.html <LocationMatch "/error/(?<NUMBER>[0-9]+)"> Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html" </LocationMatch> </highlight> Loading Loading @@ -383,22 +386,24 @@ Redirect "/one" "/two" Redirect permanent "/one" "http://example.com/two" Redirect 303 "/three" "http://example.com/other" </highlight> <p>If the <directive>Redirect</directive> directive is used within a <directive type="section" module="core">Location</directive> or <directive type="section" module="core">LocationMatch</directive> section with the URL-path omitted, then the URL parameter will be interpreted using <a href="../expr.html">expression syntax</a>.</p> interpreted using <a href="../expr.html">expression syntax</a>.<br /> This syntax is available in Apache 2.4.19 and later.</p> <highlight language="config"> <Location /one> Redirect permanent http://example.com/two </Location><br /> <Location /three> Redirect 303 http://example.com/other </Location><br /> <LocationMatch /error/(?<NUMBER>[0-9]+)> Redirect permanent http://example.com/errors/%{env:MATCH_NUMBER}.html </LocationMatch><br /> <Location "/one"> Redirect permanent "http://example.com/two" </Location> <Location "/three"> Redirect 303 "http://example.com/other" </Location> <LocationMatch "/error/(?<NUMBER>[0-9]+)"> Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html" </LocationMatch> </highlight> </usage> Loading Loading @@ -438,7 +443,6 @@ of the current URL</description> See <directive module="mod_alias">AliasMatch</directive> for details.</p> </usage> </directivesynopsis> Loading Loading @@ -544,19 +548,21 @@ ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl" <directive>ScriptAlias</directive> and revealing the source code of the CGI scripts if they are not restricted by a <directive module="core">Directory</directive> section.</note> <p>If the <directive>ScriptAlias</directive> directive is used within a <directive type="section" module="core">Location</directive> or <directive type="section" module="core">LocationMatch</directive> section with the URL-path omitted, then the URL parameter will be interpreted using <a href="../expr.html">expression syntax</a>.</p> interpreted using <a href="../expr.html">expression syntax</a>.<br /> This syntax is available in Apache 2.4.19 and later.</p> <highlight language="config"> <Location /cgi-bin > ScriptAlias /web/cgi-bin/ <Location "/cgi-bin"> ScriptAlias "/web/cgi-bin/" </Location> <LocationMatch /cgi-bin/errors/(?<NUMBER>[0-9]+)> ScriptAlias /web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi </LocationMatch><br /> <LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)"> ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi" </LocationMatch> </highlight> </usage> Loading