From cbf164a6c55c6200a5618a485ab68be63a23fb62 Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Mon, 15 Jun 2026 19:14:34 +0000 Subject: [PATCH] Sync trunk mod_rewrite doc with enhancements to 2.4 At some point, I made an update to the 2.4 doc and didn't make it in trunk. This improves the "what gets matched" and "per-directory" bits of the RewriteRule doc. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935382 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_rewrite.xml | 110 +++++++++++++++++++++++++++----- 1 file changed, 95 insertions(+), 15 deletions(-) diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index a06cdf7ffa..e0cb272f07 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -1168,24 +1168,104 @@ RewriteRule "^/$" "/homepage.std.html" [L] <a id="what_is_matched" name="what_is_matched">What is matched?</a> -

-The Pattern is matched against the %-decoded URL-path -(in server context) or the directory-relative path (in -per-directory context). -See RewriteRule -Basics for details on what the pattern is matched against -in each context. -

+
<glossary ref="perdirectory">Per-directory</glossary> Rewrites -

-Using rewrite rules in per-directory -context requires special attention to how patterns are -matched and how rule inheritance works. See the -Per-directory Rewrites -guide for complete details. -

+ + + +<If "true"> + # 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] +</If> +<If "true"> + RewriteRule bar http://example.com/bar [R] +</If> + +

For information on regular -- 2.47.3