From: Rich Bowen Date: Wed, 28 May 2008 02:20:56 +0000 (+0000) Subject: Make the example match the explanatory text, and add a cautionary note. X-Git-Tag: 2.3.0~569 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb34f3c72a06ab6d2248266b943b06f7672bce56;p=apache Make the example match the explanatory text, and add a cautionary note. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@660788 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/rewrite_guide.html.en b/docs/manual/rewrite/rewrite_guide.html.en index d8297649f8..69f847bd88 100644 --- a/docs/manual/rewrite/rewrite_guide.html.en +++ b/docs/manual/rewrite/rewrite_guide.html.en @@ -165,8 +165,16 @@ RewriteRule ^/$ /about/ [R]

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

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

+ +

Note also that the example rewrites only the root URL. That is, it +rewrites a request for http://example.com/, but not a +request for http://example.com/page.html. If you have in +fact changed your document root - that is, if all of +your content is in fact in that subdirectory, it is greatly preferable +to simply change your DocumentRoot +directive, rather than rewriting URLs.

diff --git a/docs/manual/rewrite/rewrite_guide.xml b/docs/manual/rewrite/rewrite_guide.xml index 6f4e971772..ff18e7e9fa 100644 --- a/docs/manual/rewrite/rewrite_guide.xml +++ b/docs/manual/rewrite/rewrite_guide.xml @@ -155,8 +155,16 @@ RewriteRule ^/$ /about/ [R] module="mod_alias">RedirectMatch directive:

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

Note also that the example rewrites only the root URL. That is, it +rewrites a request for http://example.com/, but not a +request for http://example.com/page.html. If you have in +fact changed your document root - that is, if all of +your content is in fact in that subdirectory, it is greatly preferable +to simply change your DocumentRoot +directive, rather than rewriting URLs.