From: Rich Bowen Date: Fri, 15 May 2026 17:17:07 +0000 (+0000) Subject: Adds example for [C] flag X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=aeca9100950d285df6d096fc53db5a739e03e0ef;p=thirdparty%2Fapache%2Fhttpd.git Adds example for [C] flag git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1934231 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index 23c4e5aa50..49a03d2f01 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -186,6 +186,17 @@ control moves on to the next rule. However, if it does not match, then the next rule, and any other rules that are chained together, are skipped.

+ +# Rewrite legacy product URLs to the new catalog app, +# and add a tracking parameter — but only for the rewritten ones. +RewriteRule "^/products/([0-9]+)$" "/catalog/item/$1" [C] +RewriteRule "^/catalog/(.*)$" "/catalog/$1?via=legacy" [QSA] + + +

Without the [C] flag, the second rule would also match requests +that arrive at /catalog/ directly. The chain ensures the +second rule is only applied when the first rule matched.

+
CO|cookie