From a67a202398ca2b430c65edccb4c46456a7c7bc78 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Tue, 9 Jun 2015 05:13:03 +0000 Subject: [PATCH] Add compatibility note. Turn some tabs into space. Remove some useless
in blocks. (this was causing some additionnal blank lines at the end of some examples) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1684314 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_alias.xml | 37 +++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/docs/manual/mod/mod_alias.xml b/docs/manual/mod/mod_alias.xml index 015c7de3e6..23fcea7239 100644 --- a/docs/manual/mod/mod_alias.xml +++ b/docs/manual/mod/mod_alias.xml @@ -54,7 +54,7 @@ or LocationMatch section, expression syntax can be used to manipulate the destination path or URL. -

+

mod_alias is designed to handle simple URL manipulation tasks. For more complicated tasks such as @@ -182,7 +182,8 @@ Alias "/image" "/ftp/pub/image" Location or LocationMatch section the URL-path is omitted, and the file-path is interpreted - using expression syntax.

+ using expression syntax.
+ This syntax is available in Apache 2.4.13 and later.

<Location "/image"> @@ -275,8 +276,8 @@ expressions serve different kinds of files from different directories:

- AliasMatch "^/image/(.*)\.jpg$" "/files/jpg.images/$1.jpg"
- AliasMatch "^/image/(.*)\.gif$" "/files/gif.images/$1.gif" +AliasMatch "^/image/(.*)\.jpg$" "/files/jpg.images/$1.jpg" +AliasMatch "^/image/(.*)\.gif$" "/files/gif.images/$1.gif"

Multiple leading slashes in the requested URL are discarded @@ -325,12 +326,12 @@ Redirect "/one" "/two"

If the client requests http://example.com/service/foo.txt, it will be told to access http://foo2.example.com/service/foo.txt - instead. This includes requests with GET parameters, such as + instead. This includes requests with GET parameters, such as http://example.com/service/foo.pl?q=23&a=42, it will be redirected to http://foo2.example.com/service/foo.pl?q=23&a=42. - Note that POSTs will be discarded.
- Only complete path segments are matched, so the above + Note that POSTs will be discarded.
+ Only complete path segments are matched, so the above example would not match a request for http://example.com/servicefoo.txt. For more complex matching using the expression syntax, omit the URL-path @@ -390,18 +391,19 @@ Redirect 303 "/three" "http://example.com/other" Location or LocationMatch section with the URL-path omitted, then the URL parameter will be - interpreted using expression syntax.

+ interpreted using expression syntax.
+ This syntax is available in Apache 2.4.13 and later.

<Location "/one"> Redirect permanent "http://example.com/two" -</Location>
+</Location> <Location "/three"> Redirect 303 "http://example.com/other" -</Location>
+</Location> <LocationMatch "/error/(?<NUMBER>[0-9]+)"> Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html" -</LocationMatch>
+</LocationMatch>
@@ -512,11 +514,11 @@ Alias "/cgi-bin/" "/web/cgi-bin/" </Location>
-

ScriptAlias can also be used in conjunction with - a script or handler you have. For example:

+

ScriptAlias can also be used in conjunction with + a script or handler you have. For example:

- - ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl" + +ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl"

In this scenario all files requested in /cgi-bin/ will be @@ -552,7 +554,8 @@ Alias "/cgi-bin/" "/web/cgi-bin/" a Location or LocationMatch section with the URL-path omitted, then the URL parameter will be - interpreted using expression syntax.

+ interpreted using expression syntax.
+ This syntax is available in Apache 2.4.13 and later.

<Location "/cgi-bin"> @@ -560,7 +563,7 @@ Alias "/cgi-bin/" "/web/cgi-bin/" </Location> <LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)"> ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi" -</LocationMatch>
+</LocationMatch>
-- 2.50.1