From c9922a79bcf7e23f829f9aac455c0e1647d175e4 Mon Sep 17 00:00:00 2001
From: Christophe Jaillet <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
@@ -116,6 +116,7 @@ Alias "/foo" "/gaq"
/foo Alias
would always match before the /foo/bar Alias, so the latter directive would be
ignored.
When the Alias,
ScriptAlias and
Redirect directives are used
@@ -187,17 +188,19 @@ Alias "/foo" "/gaq"
Any number slashes in the URL-path parameter matches any number of slashes in the requested URL-path.
+If the Alias directive is used within a
<Location>
or <LocationMatch>
section the URL-path is omitted, and the file-path is interpreted
- using expression syntax.
<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>
@@ -383,22 +386,23 @@ Redirect "/one" "/two"
Redirect permanent "/one" "http://example.com/two" Redirect 303 "/three" "http://example.com/other"+
If the Redirect directive is used within a
<Location>
or <LocationMatch>
section with the URL-path omitted, then the URL parameter will be
- interpreted using expression syntax.
<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>
-
<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>
@@ -437,7 +441,6 @@ of the current URL
details.
-
/web/cgi-bin/foo. This configuration
is essentially equivalent to:
Alias "/cgi-bin/" "/web/cgi-bin/"
-<Location "/cgi-bin" >
+<Location "/cgi-bin">
SetHandler cgi-script
Options +ExecCGI
</Location>
@@ -533,19 +536,20 @@ target as a CGI script
ScriptAlias and revealing the source code
of the CGI scripts if they are not restricted by a
Directory section.If the ScriptAlias directive is used within
a <Location>
or <LocationMatch>
section with the URL-path omitted, then the URL parameter will be
- interpreted using expression syntax.
<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>
-
+<LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)">
+ ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi"
+</LocationMatch>
diff --git a/docs/manual/mod/mod_alias.xml.fr b/docs/manual/mod/mod_alias.xml.fr
index a62d6cac0e3..f6d23efa5b7 100644
--- a/docs/manual/mod/mod_alias.xml.fr
+++ b/docs/manual/mod/mod_alias.xml.fr
@@ -1,7 +1,7 @@
-
+
diff --git a/docs/manual/mod/mod_alias.xml.ja b/docs/manual/mod/mod_alias.xml.ja
index 87ba2503f0b..116e6fe1582 100644
--- a/docs/manual/mod/mod_alias.xml.ja
+++ b/docs/manual/mod/mod_alias.xml.ja
@@ -1,7 +1,7 @@
-
+
+
+