httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r883030 - in /httpd/httpd/trunk/docs/manual/mod: mod_rewrite.html.en mod_rewrite.xml
Date Sun, 22 Nov 2009 01:39:00 GMT
Author: covener
Date: Sun Nov 22 01:38:59 2009
New Revision: 883030

URL: http://svn.apache.org/viewvc?rev=883030&view=rev
Log:
continue clarification of RewriteBase, lots of users who install little
PHP apps with an Alias a) leave off RewriteBase then b) add the filesystem
path instead of the URL-path then c) spend hours trying to debug
the RewriteRules themselves.

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en
    httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml

Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en?rev=883030&r1=883029&r2=883030&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en Sun Nov 22 01:38:59 2009
@@ -78,26 +78,32 @@
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_rewrite</td></tr>
 </table>
       <p>The <code class="directive">RewriteBase</code> directive explicitly
-      sets the base URL for per-directory rewrites.
+      sets the base URL-path (not filesystem directory path!)  for per-directory rewrites.
       When you use a <code class="directive"><a href="#rewriterule">RewriteRule</a></code>
       in a <code>.htaccess</code> file, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
strips off
       the local directory prefix before processing, then rewrites the rest of 
       the URL. When the rewrite is completed, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
       automatically adds the local directory prefix back on to the path.</p>
       
-      <p>If your URL path does not exist on the filesystem,
+      <p>This directive is <em>required</em> for per-directory rewrites
whose context
+      is a directory made available via the <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code>
+      directive.</p>
+
+      <p>If your URL path does not exist verbatim on the filesystem,
+      or isn't directly under your <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>,
       you must use <code class="directive">RewriteBase</code> in every
-      <code>.htaccess</code> file where you want to use <code class="directive"><a
href="#rewriterule">RewriteRule</a></code> directives.  </p>
+      <code>.htaccess</code> file where you want to use <code class="directive"><a
href="#rewriterule">RewriteRule</a></code> directives.</p>
 
       <p>The example below demonstrates how to map 
-      <code>http://example.com/foo/index.html</code> to 
+      <code>http://example.com/myapp/index.html</code> to 
       <code>/home/www/example/newsite.html</code>, in a <code>.htaccess</code>

       file. This assumes that the content available at
       <code>http://example.com/</code> is on disk at 
       <code>/home/www/example/</code>.</p>
 <div class="example"><pre>
 RewriteEngine On
-RewriteBase /foo/
+# The URL-path used to get to this context, not the filesystem path
+RewriteBase /myapp/
 RewriteRule ^index\.html$  newsite.html
 </pre></div>
 

Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml?rev=883030&r1=883029&r2=883030&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Sun Nov 22 01:38:59 2009
@@ -503,20 +503,25 @@
 
 <usage>
       <p>The <directive>RewriteBase</directive> directive explicitly
-      sets the base URL for per-directory rewrites.
+      sets the base URL-path (not filesystem directory path!)  for per-directory rewrites.
       When you use a <directive module="mod_rewrite">RewriteRule</directive>
       in a <code>.htaccess</code> file, <module>mod_rewrite</module>
strips off
       the local directory prefix before processing, then rewrites the rest of 
       the URL. When the rewrite is completed, <module>mod_rewrite</module>
       automatically adds the local directory prefix back on to the path.</p>
       
-      <p>If your URL path does not exist on the filesystem,
+      <p>This directive is <em>required</em> for per-directory rewrites
whose context
+      is a directory made available via the <directive module="mod_alias">Alias</directive>
+      directive.</p>
+
+      <p>If your URL path does not exist verbatim on the filesystem,
+      or isn't directly under your <directive module="core">DocumentRoot</directive>,
       you must use <directive>RewriteBase</directive> in every
       <code>.htaccess</code> file where you want to use <directive
-      module="mod_rewrite">RewriteRule</directive> directives.  </p>
+      module="mod_rewrite">RewriteRule</directive> directives.</p>
 
       <p>The example below demonstrates how to map 
-      <code>http://example.com/foo/index.html</code> to 
+      <code>http://example.com/myapp/index.html</code> to 
       <code>/home/www/example/newsite.html</code>, in a <code>.htaccess</code>

       file. This assumes that the content available at
       <code>http://example.com/</code> is on disk at 
@@ -524,7 +529,8 @@
 <example>
 <pre>
 RewriteEngine On
-RewriteBase /foo/
+# The URL-path used to get to this context, not the filesystem path
+RewriteBase /myapp/
 RewriteRule ^index\.html$  newsite.html
 </pre>
 </example>



Mime
View raw message