summaryrefslogtreecommitdiffstats
path: root/docs/manual/mod/mod_alias.xml
diff options
context:
space:
mode:
authorJoshua Slive <slive@apache.org>2004-03-23 05:23:25 +0100
committerJoshua Slive <slive@apache.org>2004-03-23 05:23:25 +0100
commit7896be49ddc0af6e4b342634fb203e5b57fa30e2 (patch)
treeefe3d49c0ba8fbc11ee5a94bfe8095dc3bb012d6 /docs/manual/mod/mod_alias.xml
parentMention that mod_userdir is required for suexec to work (diff)
downloadapache2-7896be49ddc0af6e4b342634fb203e5b57fa30e2.tar.xz
apache2-7896be49ddc0af6e4b342634fb203e5b57fa30e2.zip
Clarify the order of processing in mod_alias.
PR: 21897 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103094 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_alias.xml')
-rw-r--r--docs/manual/mod/mod_alias.xml35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/manual/mod/mod_alias.xml b/docs/manual/mod/mod_alias.xml
index a8cfe6bee7..7e29b4f67e 100644
--- a/docs/manual/mod/mod_alias.xml
+++ b/docs/manual/mod/mod_alias.xml
@@ -49,6 +49,41 @@
<seealso><module>mod_rewrite</module></seealso> <seealso><a
href="../urlmapping.html">Mapping URLs to the filesystem</a></seealso>
+<section id="order"><title>Order of Processing</title>
+
+<p>Aliases and Redirects occuring in different contexts are processed
+like other directives according to standard <a
+href="../sections.html#mergin">merging rules</a>. But when multiple
+Aliases or Redirects occur in the same context (for example, in the
+same <directive type="section" module="core">VirtualHost</directive>
+section) they are processed in a particular order.</p>
+
+<p>First, all Redirects are processed before Aliases are processed,
+and therefore a request that matches a <directive
+module="mod_alias">Redirect</directive> or <directive
+module="mod_alias">RedirectMatch</directive> will never have Aliases
+applied. Second, the Aliases and Redirects are processed in the order
+they appear in the configuration files, with the first match taking
+precedence.</p>
+
+<p>For this reason, when two or more of these directives apply to the
+same sub-path, you must list the most specific path first in order for
+all the directives to have an effect. For example, the following
+configuration will work as expected:</p>
+
+<example>
+Alias /foo/bar /baz<br />
+Alias /foo /gaq
+</example>
+
+<p>But if the above two directives were reversed in order, the
+<code>/foo</code> <directive module="mod_alias">Alias</directive>
+would always match before the <code>/foo/bar</code> <directive
+module="mod_alias">Alias</directive>, so the latter directive would be
+ignored.</p>
+
+</section>
+
<directivesynopsis>
<name>Alias</name>
<description>Maps URLs to filesystem locations</description>