You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2008/05/28 04:20:57 UTC
svn commit: r660788 - in /httpd/httpd/trunk/docs/manual/rewrite:
rewrite_guide.html.en rewrite_guide.xml
Author: rbowen
Date: Tue May 27 19:20:56 2008
New Revision: 660788
URL: http://svn.apache.org/viewvc?rev=660788&view=rev
Log:
Make the example match the explanatory text, and add a cautionary note.
Modified:
httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en
httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml
Modified: httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en?rev=660788&r1=660787&r2=660788&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en Tue May 27 19:20:56 2008
@@ -165,8 +165,16 @@
<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>
Modified: httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml?rev=660788&r1=660787&r2=660788&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml Tue May 27 19:20:56 2008
@@ -155,8 +155,16 @@
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>