substitutions, in particular, are likely to break in
these contexts.</p>
+<note type="warning"><title>These containers silently change rewrite
+behavior</title>
+<p>Placing a <directive module="mod_rewrite">RewriteRule</directive>
+inside a <directive module="core" type="section">Directory</directive>,
+<directive module="core" type="section">If</directive>, or
+<directive module="core" type="section">Location</directive> block
+— even inside a
+<directive module="core" type="section">VirtualHost</directive> in the
+main server config — silently switches to
+<glossary ref="perdirectory">per-directory context</glossary> behavior.
+This means the leading slash is stripped from the URL before pattern
+matching, substitutions trigger an internal redirect (with loop risk),
+and the <a href="../rewrite/flags.html#flag_l">[L]</a> flag no longer
+truly stops processing — use
+<a href="../rewrite/flags.html#flag_end">[END]</a> instead.</p>
+</note>
+
</section>
<section id="inheritance"><title>Rule inheritance with RewriteOptions</title>
but the rules behave differently there — in particular, the directory
prefix is stripped from the URL before matching. See the
<a href="htaccess.html#path-stripping">Per-directory Rewrites</a>
-document for full details.</p>
+document for full details. Note that
+<directive module="core" type="section">If</directive> and
+<directive module="core" type="section">Location</directive> blocks
+also trigger per-directory behavior — see
+<a href="htaccess.html#context-restrictions">Which contexts support rewrite rules?</a>.</p>
</section>