]> granicus.if.org Git - apache/commitdiff
Explicitly mention how to do rewriting in a vhost.
authorJoshua Slive <slive@apache.org>
Tue, 31 Jul 2007 19:36:41 +0000 (19:36 +0000)
committerJoshua Slive <slive@apache.org>
Tue, 31 Jul 2007 19:36:41 +0000 (19:36 +0000)
PR: 36506

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@561456 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.html.en
docs/manual/mod/mod_rewrite.xml

index fe33dc2e5fe649ba9131c85e2730ee478f55f343..06b2aa60485ea25032089e5df2348570b74b1695 100644 (file)
@@ -69,6 +69,7 @@ URLs on the fly</td></tr>
 <ul id="topics">
 <li><img alt="" src="../images/down.gif" /> <a href="#quoting">Quoting Special Characters</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#EnvVar">Environment Variables</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#vhosts">Rewriting in Virtual Hosts</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#Solutions">Practical Solutions</a></li>
 </ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -108,6 +109,19 @@ SCRIPT_URL=/u/rse/
 SCRIPT_URI=http://en1.engelschall.com/u/rse/
 </pre></div>
 
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="vhosts" id="vhosts">Rewriting in Virtual Hosts</a></h2>
+
+     <p>By default, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> configuration
+     settings from the main server context are not inherited by
+     virtual hosts. To make the main server settings apply to virtual
+     hosts, you must place the following directives in each <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> section:</p>
+
+     <div class="example"><p><code>
+     RewriteEngine On<br />
+     RewriteOptions inherit
+     </code></p></div>
 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
 <h2><a name="Solutions" id="Solutions">Practical Solutions</a></h2>
@@ -634,10 +648,10 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       <p>Use this directive to disable the module instead of
       commenting out all the <code class="directive"><a href="#rewriterule">RewriteRule</a></code> directives!</p>
 
-      <p>Note that, by default, rewrite configurations are not
-      inherited. This means that you need to have a
+      <p>Note that rewrite configurations are not
+      inherited by virtual hosts. This means that you need to have a
       <code>RewriteEngine on</code> directive for each virtual host
-      in which you wish to use it.</p>
+      in which you wish to use rewrite rules.</p>
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
index 35ecd2667f0a8151d14215f13806f6887d47010c..3b20638b6fdd0cdc33cf598433719ea73eb3f458 100644 (file)
@@ -95,6 +95,20 @@ SCRIPT_URI=http://en1.engelschall.com/u/rse/
 
 </section>
 
+<section id="vhosts"><title>Rewriting in Virtual Hosts</title>
+
+     <p>By default, <module>mod_rewrite</module> configuration
+     settings from the main server context are not inherited by
+     virtual hosts. To make the main server settings apply to virtual
+     hosts, you must place the following directives in each <directive
+     module="core" type="section">VirtualHost</directive> section:</p>
+
+     <example>
+     RewriteEngine On<br />
+     RewriteOptions inherit
+     </example>
+</section>
+
 <section id="Solutions"><title>Practical Solutions</title>
 
     <p>For numerous examples of common, and not-so-common, uses for
@@ -126,10 +140,10 @@ SCRIPT_URI=http://en1.engelschall.com/u/rse/
       commenting out all the <directive
       module="mod_rewrite">RewriteRule</directive> directives!</p>
 
-      <p>Note that, by default, rewrite configurations are not
-      inherited. This means that you need to have a
+      <p>Note that rewrite configurations are not
+      inherited by virtual hosts. This means that you need to have a
       <code>RewriteEngine on</code> directive for each virtual host
-      in which you wish to use it.</p>
+      in which you wish to use rewrite rules.</p>
 </usage>
 
 </directivesynopsis>