<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>
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"><VirtualHost></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>
<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>
</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
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>