]> granicus.if.org Git - apache/commitdiff
Make the example match the explanatory text, and add a cautionary note.
authorRich Bowen <rbowen@apache.org>
Wed, 28 May 2008 02:20:56 +0000 (02:20 +0000)
committerRich Bowen <rbowen@apache.org>
Wed, 28 May 2008 02:20:56 +0000 (02:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@660788 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/rewrite/rewrite_guide.html.en
docs/manual/rewrite/rewrite_guide.xml

index d8297649f8c7735101598ccb6b32b4f378fd4fc9..69f847bd8805482b89b9cb6fddaa3c39721af79c 100644 (file)
@@ -165,8 +165,16 @@ RewriteRule   <strong>^/$</strong>  /about/  [<strong>R</strong>]
     <p>Note that this can also be handled using the <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> directive:</p>
 
 <div class="example"><p><code>
-RedirectMatch ^/$ http://example.com/e/www/
+RedirectMatch ^/$ http://example.com/about/
 </code></p></div>
+
+<p>Note also that the example rewrites only the root URL. That is, it
+rewrites a request for <code>http://example.com/</code>, but not a
+request for <code>http://example.com/page.html</code>. If you have in 
+fact changed your document root - that is, if <strong>all</strong> of 
+your content is in fact in that subdirectory, it is greatly preferable 
+to simply change your <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>
+directive, rather than rewriting URLs.</p>
 </dd>
 </dl>
 
index 6f4e971772b4548ce1274290f4a90077aff6f095..ff18e7e9fadc9c079d3a34dd030fd39a888c1e59 100644 (file)
@@ -155,8 +155,16 @@ RewriteRule   <strong>^/$</strong>  /about/  [<strong>R</strong>]
     module="mod_alias">RedirectMatch</directive> directive:</p>
 
 <example>
-RedirectMatch ^/$ http://example.com/e/www/
+RedirectMatch ^/$ http://example.com/about/
 </example>
+
+<p>Note also that the example rewrites only the root URL. That is, it
+rewrites a request for <code>http://example.com/</code>, but not a
+request for <code>http://example.com/page.html</code>. If you have in 
+fact changed your document root - that is, if <strong>all</strong> of 
+your content is in fact in that subdirectory, it is greatly preferable 
+to simply change your <directive module="core">DocumentRoot</directive>
+directive, rather than rewriting URLs.</p>
 </dd>
 </dl>