From: Rich Bowen Date: Mon, 25 May 2026 18:21:56 +0000 (+0000) Subject: docs: Insert mod_rewrite overview flowchart as Figure 1 in rewrite/tech X-Git-Tag: 2.4.68-rc1-candidate~84 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=ebd80dfbdbae8cc5021fc53999ef09c0b835a8f1;p=thirdparty%2Fapache%2Fhttpd.git docs: Insert mod_rewrite overview flowchart as Figure 1 in rewrite/tech Add new per-request rewrite process diagram (Figure 1) showing both per-server and per-directory phases with RewriteCond evaluation. Renumber existing ruleset diagram to Figure 2. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1934611 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/tech.xml b/docs/manual/rewrite/tech.xml index 10cd6465b0..26e615acc4 100644 --- a/docs/manual/rewrite/tech.xml +++ b/docs/manual/rewrite/tech.xml @@ -142,9 +142,17 @@ and URL matching.

engine is started with the contained ruleset (one or more rules together with their conditions). The operation of the URL rewriting engine itself is exactly the same for both - configuration contexts. Only the final result processing is + configuration contexts. Only the final result processing is different.

+

+ Overview of per-request rewrite processing through
+          per-server and per-directory phases
+ Figure 1:The per-request rewrite process showing + both per-server and per-directory rule processing phases +

+

The order of rules in the ruleset is important because the rewriting engine processes them in a special (and not very obvious) order. The rule is this: The rewriting engine loops @@ -154,11 +162,11 @@ and URL matching.

existing corresponding conditions (RewriteCond directives). For historical reasons the conditions are given first, and so the control flow is a little bit long-winded. See - Figure 1 for more details.

+ Figure 2 for more details.

Flow of RewriteRule and RewriteCond matching
- Figure 1:The control flow through the rewriting ruleset + Figure 2:The control flow through the rewriting ruleset

First the URL is matched against the Pattern of each rule. If it fails, mod_rewrite