1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00

As per bug 22061, this paragraph predates RedirectMatch, and is thus

soemwhat inaccurate.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rich Bowen
2004-12-28 22:28:53 +00:00
parent 3d9ff93e16
commit 677b22e97d

View File

@@ -172,20 +172,21 @@ RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
<dt>Solution:</dt>
<dd>
<p>We just redirect the URL <code>/</code> to
<code>/e/www/</code>. While is seems trivial it is
actually trivial with <module>mod_rewrite</module>, only.
Because the typical old mechanisms of URL <em>Aliases</em>
(as provides by <module>mod_alias</module> and friends)
only used <em>prefix</em> matching. With this you cannot
do such a redirection because the <directive module="core"
>DocumentRoot</directive> is a prefix of all URLs. With
<module>mod_rewrite</module> it is really trivial:</p>
<p>We redirect the URL <code>/</code> to
<code>/e/www/</code>:
</p>
<example><pre>
RewriteEngine on
RewriteRule <strong>^/$</strong> /e/www/ [<strong>R</strong>]
</pre></example>
<p>Note that this can also be handled using the <directive
module="mod_alias">RedirectMatch</directive> directive:</p>
<example>
RedirectMatch ^/$ http://example.com/e/www/
</example>
</dd>
</dl>