Detailed description of Apache URL rewriting rules
1) R [= Code] (Force redirect) force external redirection
Force the replacement string to add http: // thishost [: thisport]/prefix to the external URL. If the code is not specified, the default 302 HTTP status code will be used.
2) f (Force URL to be forbidden) disables the URL and returns a 403http status code.
3) g (Force URL to be gone) forces the URL to be gone and returns the response HTTP status code.
4) P (Force proxy) enforces proxy forwarding.
5) L (last rule) indicates that the current rule is the last rule. After the analysis is stopped, the rule is overwritten.
6) n (next round) re-runs the rewrite process from the first rule.
7) C (chained with next rule) is associated with the next rule
If the rule matches, it is processed normally and the flag is invalid. If the rule does not match, all associated rules are skipped.
8) t = mime-type (Force MIME type) force MIME type
9) NS (used only if no internal sub-Request) is used only for non-Internal subrequests
10) NC (no case) is case insensitive
11) QSA (query string append) append request string
12) NE (no URI escaping of output) does not escape special characters
Example: rewriterule/Foo/(. *)/bar? Arg = p1/% 3d $1 [R, ne] will be able to correctly convert/Foo/zoo to/bar? Arg = p1 = Zed
13) pass through to next handler to the next Processing
For example:
Rewriterule ^/ABC (. *)/DEF $1 [pt] # will be handed over to/DEF rules for processing
Alias/DEF/Ghi
14) S = num (skip next rule (s) skipping num rules
15) E = var: Val (set environment variable) set Environment Variables