From: Rich Bowen Date: Tue, 28 Dec 2004 22:28:53 +0000 (+0000) Subject: As per bug 22061, this paragraph predates RedirectMatch, and is thus X-Git-Tag: 2.1.3~217 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=677b22e97ddfb16f4b3f8c208fc9b63e7bf4d3eb;p=apache 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 --- diff --git a/docs/manual/misc/rewriteguide.xml b/docs/manual/misc/rewriteguide.xml index cad3b6d1ad..0065aa1354 100644 --- a/docs/manual/misc/rewriteguide.xml +++ b/docs/manual/misc/rewriteguide.xml @@ -172,20 +172,21 @@ RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
Solution:
-

We just redirect the URL / to - /e/www/. While is seems trivial it is - actually trivial with mod_rewrite, only. - Because the typical old mechanisms of URL Aliases - (as provides by mod_alias and friends) - only used prefix matching. With this you cannot - do such a redirection because the DocumentRoot is a prefix of all URLs. With - mod_rewrite it is really trivial:

- +

We redirect the URL / to + /e/www/: +

+
 RewriteEngine on
 RewriteRule   ^/$  /e/www/  [R]
 
+ +

Note that this can also be handled using the RedirectMatch directive:

+ + + RedirectMatch ^/$ http://example.com/e/www/ +