From: Rich Bowen Date: Tue, 28 Dec 2004 22:28:02 +0000 (+0000) Subject: As per bug # 22061, this paragraph was written prior to the X-Git-Tag: 2.0.53~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0525e8dd0b900ed7412e74468e48532e7a61b954;p=thirdparty%2Fapache%2Fhttpd.git As per bug # 22061, this paragraph was written prior to the RedirectMatch directive, and thus was somewhat inaccurate. That, and it contained just a few too many "trivial"s for my liking. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@123578 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/misc/rewriteguide.xml b/docs/manual/misc/rewriteguide.xml index a20b9719df3..0d12f1f1549 100644 --- a/docs/manual/misc/rewriteguide.xml +++ b/docs/manual/misc/rewriteguide.xml @@ -180,20 +180,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/ +