2010年6月21日 星期一

RewriteRule flag list

RewriteRule Option
Significance
Description
I
Ignore case
The regular expression of the RewriteRule and any corresponding RewriteCond directives is performed using case-insensitive matching.(不分大小寫)
F
Forbidden(被禁止)
In case the RewriteRule regular expression matches, the web server returns a 404 Not Found response, regardless of the format string (second parameter of RewriteRule) specified. Read Chapter 4 for more details about the HTTP status codes.
L
Last rule
If a match is found, stop processing further rules.
N
Next iteration
Restarts processing the set of rules from the beginning, but using the current rewritten URL. The number of restarts is limited by the value specified with the RepeatLimit directive.
NS
Next iteration of the same rule
Restarts processing the rule, using the rewritten URL. The number of restarts is limited by the value specified with the RepeatLimit directive, and is calculated independently of the number of restarts counted for the N directive.
P
Proxy
Immediately passes the rewritten URL to the ISAPI extension that handles proxy requests. The new URL must be a complete URL that includes the protocol, domain name, and so on.
R
Redirect
Sends a 302 redirect status code to the client pointing to the new URL, instead of rewriting the URL. This is always the last rule, even if the L flag is not specified.
RP
Permanent redirect
The same as R, except the 301 status code is used instead.
U
Unmangle log
Log the new URL as it was the originally requested URL.
O
Normalize
Normalize the URL before processing by removing illegal characters, and so on, and also deletes the query string.
CL
Lowercase
Changes the rewritten URL to lowercase.
CU
Uppercase
Changes the rewritten URL to uppercase.

【下列文章您可能也有興趣】

沒有留言: