]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Rewrite guide: trim [L] flag section, eliminate looping duplication
authorRich Bowen <rbowen@apache.org>
Mon, 11 May 2026 16:29:45 +0000 (16:29 +0000)
committerRich Bowen <rbowen@apache.org>
Mon, 11 May 2026 16:29:45 +0000 (16:29 +0000)
The [L] section in flags.xml spent 4 paragraphs re-explaining the
per-directory looping behavior that is covered definitively in
htaccess.xml#loops. Replace with a 3-line summary and cross-references
to [END] and the Per-directory Rewrites document.Rewrite guide: trim [L] flag section, eliminate looping duplication

The [L] section in flags.xml spent 4 paragraphs re-explaining the
per-directory looping behavior that is covered definitively in
htaccess.xml#loops. Replace with a 3-line summary and cross-references
to [END] and the Per-directory Rewrites document.

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

docs/manual/rewrite/TODO.md
docs/manual/rewrite/flags.xml

index 55c75c55ada94cfc95147896e855b02aab08ccc4..338e2dbce38648124437ea56a1f074fe1289b06d 100644 (file)
@@ -10,7 +10,7 @@ result in one file "owning" the content and others cross-referencing it.
       tables in tech.xml and htaccess.xml.
       → htaccess.xml owns it; others get a brief mention + xref.
 
-- [ ] **[L] vs [END] looping** fully described in three places
+- [x] **[L] vs [END] looping** fully described in three places
       (htaccess.xml, plus both the [L] and [END] sections of flags.xml).
       → htaccess.xml owns the full explanation; flags.xml slims down + xrefs.
 
index a28039ff3c56229a7141f1828ad7d98adbbe17df..96f03a2f5f98c6ccd5092768856504a22bfd676f 100644 (file)
@@ -479,32 +479,12 @@ further rules will be processed. This corresponds to the
 C. Use this flag to indicate that the current rule should be applied
 immediately without considering further rules.</p>
 
-<p>If you are using <directive
-module="mod_rewrite">RewriteRule</directive> in either
-<code>.htaccess</code> files or in
-<directive type="section" module="core">Directory</directive> sections,
-it is important to have some understanding of how the rules are
-processed.  The simplified form of this is that once the rules have been
-processed, the rewritten request is handed back to the URL parsing
-engine to do what it may with it. It is possible that as the rewritten
-request is handled, the <code>.htaccess</code> file or
-<directive type="section" module="core">Directory</directive> section
-may be encountered again, and thus the ruleset may be run again from the
-start. Most commonly this will happen if one of the rules causes a
-redirect - either internal or external - causing the request process to
-start over.</p>
-
-<p>It is therefore important, if you are using <directive
-module="mod_rewrite">RewriteRule</directive> directives in one of these
-contexts, that you take explicit steps to avoid rules looping, and not
-count solely on the [L] flag to terminate execution of a series of
-rules, as shown below.</p>
-
-<p> An alternative flag, [END], can be used to terminate not only the
-current round of rewrite processing but prevent any subsequent
-rewrite processing from occurring in per-directory (htaccess)
-context. This does not apply to new requests resulting from external
-redirects.</p>
+<p>In <glossary ref="perdirectory">per-directory</glossary> context,
+[L] stops the current pass through the ruleset, but the rewritten
+request may be re-processed from the top — which can cause loops.
+Use the <a href="#flag_end">[END]</a> flag to prevent this, or see
+the <a href="htaccess.html#loops">Per-directory Rewrites</a> document
+for a full discussion of the issue and alternative solutions.</p>
 
 <p>The example given here will rewrite any request to
 <code>index.php</code>, giving the original request as a query string