You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by el...@apache.org on 2019/02/09 14:15:28 UTC

svn commit: r1853281 - /httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en

Author: elukey
Date: Sat Feb  9 14:15:27 2019
New Revision: 1853281

URL: http://svn.apache.org/viewvc?rev=1853281&view=rev
Log:
mod_rewrite doc rebuild

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

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=1853281&r1=1853280&r2=1853281&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en Sat Feb  9 14:15:27 2019
@@ -1132,7 +1132,30 @@ matches in per-directory context.</li>
 (including their regular expression counterparts), this
 should never be necessary and is unsupported. A likely feature
 to break in these contexts is relative substitutions.</li>
+
+<li>The <code class="directive"><a href="../mod/core.html#if">If</a></code> blocks
+follow the rules of the <em>directory</em> context.</li>
+
+<li>By default, mod_rewrite overrides rules when <a href="../sections.html#merging">
+merging sections</a> belonging to the same context. The <code class="directive"><a href="../mod/rewrite.html#rewriteoptions">RewriteOptions</a></code> directive can change this behavior,
+for example using the <em>Inherit</em> setting.</li>
+
+<li>The <code class="directive"><a href="../mod/rewrite.html#rewriteoptions">RewriteOptions</a></code> also regulates the
+behavior of sections that are stated at the same nesting level of the configuration. In the
+following example, by default only the RewriteRules stated in the second 
+<code class="directive"><a href="../mod/core.html#if">If</a></code> block
+are considered, since the first ones are overridden. Using <code class="directive"><a href="../mod/rewrite.html#rewriteoptions">RewriteOptions</a></code> Inherit forces mod_rewrite to merge the two
+sections and consider both set of statements, rather than only the last one.</li>
 </ul>
+<div class="example"><pre class="prettyprint lang-config">&lt;If "true"&gt;
+  # Without RewriteOptions Inherit, this rule is overridden by the next
+  # section and no redirect will happen for URIs containing 'foo'
+  RewriteRule foo http://example.com/foo [R]
+&lt;/If&gt;
+&lt;If "true"&gt;
+  RewriteRule bar http://example.com/bar [R]
+&lt;/If&gt;</pre>
+</div>
 </div>
 
       <p>For some hints on <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular