From: Rich Bowen Date: Tue, 16 Jun 2026 17:14:54 +0000 (+0000) Subject: docs: Add flag quick-reference table to rewrite/flags.xml X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf1fa8abd771e161e1d2b112d4417c0c1dfc80ae;p=thirdparty%2Fapache%2Fhttpd.git docs: Add flag quick-reference table to rewrite/flags.xml Categorized table at the top of the flags page grouping flags by purpose (flow control, redirection/proxying, access control, URL/query string, metadata/handlers, cookie) with brief effect descriptions and common combo examples showing how flags are stacked in practice. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935423 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index b5cf4a417a..1b9dce0d7b 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -65,6 +65,144 @@ have no effect in per-directory context, of how you might use them.

+
Flag Quick Reference + +

Flags can be combined: [R=301,L], [P,QSA], +[E=VAR:val,L]. This table groups them by purpose, ordered +by how commonly each is used.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FlagPurposeEffectCommon combos
Flow Control
[L]Last ruleStop processing rules (this pass)[R=301,L] [F] [G]
[END]Full stopStop all rewrite processing (no re-entry in .htaccess)[R=301,END]
[S=N]SkipSkip next N rules (if/else logic)
[N]Next (loop)Restart ruleset from the top (caution: loop risk)
[C]ChainTie rule to the next; if this fails, skip chained rules
Redirection and Proxying
[R=code]RedirectExternal redirect (default 302). Consider Redirect/RedirectMatch for simple cases[R=301,L] [R=302,L]
[P]ProxyReverse proxy to target (requires mod_proxy)[P,QSA]
Access Control
[F]ForbiddenReturn 403 (implies [L])
[G]GoneReturn 410 (implies [L])
URL / Query String
[QSA]Query string appendAppend original query string to substitution[QSA,L] [P,QSA]
[QSD]Query string discardDrop original query string entirely[R=301,QSD,L]
[B]Escape backrefsRe-encode special chars in backreferences[B,PT]
[NE]No escapeDon't escape special chars in output (pass #, ? through)[R=301,NE,L]
Metadata and Handlers
[E]Set env varSet an environment variable[E=VAR:val,L]
[T]MIME typeForce content type
[H]HandlerForce a content handler
[PT]Pass throughPass result to next handler (needed with Alias/ScriptAlias)[PT,L]
Cookie
[CO]Set cookieSet an HTTP cookie on the response[CO=name:val:.domain,R=302,L]
+ +
+
B (escape backreferences)

The [B] flag instructs RewriteRule to escape non-alphanumeric