From: Rich Bowen
Date: Tue, 16 Jun 2026 17:32:20 +0000 (+0000)
Subject: docs: Add simplified mod_rewrite overview diagram to rewrite/intro.xml
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=309f4b631958bf57cb9cb465e58458dcc9948b50;p=thirdparty%2Fapache%2Fhttpd.git
docs: Add simplified mod_rewrite overview diagram to rewrite/intro.xml
New flowchart at the end of the Introduction section showing the basic
request processing loop: RewriteEngine check, iterate rules, pattern
match, RewriteCond evaluation, substitution, and L/END flag termination.
Explicitly labeled as a simplified overview with a link to tech.xml for
the full processing model. Supplements existing prose for visual
learners without replacing accessible text content.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935426 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/images/rewrite_simplified_overview.png b/docs/manual/images/rewrite_simplified_overview.png
new file mode 100644
index 0000000000..14bc1da77d
Binary files /dev/null and b/docs/manual/images/rewrite_simplified_overview.png differ
diff --git a/docs/manual/images/rewrite_simplified_overview.svg b/docs/manual/images/rewrite_simplified_overview.svg
new file mode 100644
index 0000000000..e960038caf
--- /dev/null
+++ b/docs/manual/images/rewrite_simplified_overview.svg
@@ -0,0 +1,113 @@
+
+
diff --git a/docs/manual/rewrite/intro.xml b/docs/manual/rewrite/intro.xml
index e73f84ab25..cea8264552 100644
--- a/docs/manual/rewrite/intro.xml
+++ b/docs/manual/rewrite/intro.xml
@@ -68,6 +68,19 @@ can give an overwhelming amount of information, it is indispensable in
debugging problems with mod_rewrite configuration, since
it will tell you exactly how each rule is processed.
+
+
+ Figure: Simplified overview of how
+ mod_rewrite processes a request. See
+ Technical Details for the full
+ processing model including phases, flags, and looping.
+
+ alt="Diagram showing how backreferences flow between
+ RewriteRule and RewriteCond: $1-$9 capture groups from the
+ RewriteRule pattern, %1-%9 capture groups from the most recent
+ RewriteCond TestString pattern, both available in the
+ substitution string and in subsequent RewriteCond TestStrings" />
Figure 1: The back-reference flow through a rule.
In this example, a request for /test/1234 to host admin.example.com would be transformed into /admin.foo?page=test&id=1234&host=admin.example.com, provided that %{DOCUMENT_ROOT}/test is not an existing file.
@@ -261,7 +278,10 @@ as mod_request paired with a custom filter.
+ alt="Annotated syntax diagram of the RewriteRule directive
+ showing three components: Pattern (regex matched against the
+ URL-path), Substitution (the replacement URL or path), and
+ optional Flags in square brackets" />
Figure 2: Syntax of the RewriteRule directive.
@@ -350,7 +370,10 @@ argument is a list of flags that modify how the match is evaluated.
+ alt="Annotated syntax diagram of the RewriteCond directive
+ showing two components: TestString (variable or text to test)
+ and CondPattern (regex or comparison to evaluate), with optional
+ flags in square brackets" />
Figure 3: Syntax of the RewriteCond directive