Specifies verb that will be matched against regular expression. 特别定义的动词匹配规定的表达式
TestVerb=(URL | METHOD | VERSION | HTTPHeaderName: | %ServerVariable) where:
URL - returns Request-URI of client request as described in RFC 2068 (HTTP 1.1); 返回客户端在RFC2068中描述的需求的Request-URI METHOD - returns HTTP method of client request (OPTIONS, GET, HEAD, POST, PUT, DELETE or TRACE); 返回客户端需求(OPTIONS, GET, HEAD, POST, PUT, DELETE or TRACE)的HTTP方法 VERSION - returns HTTP version; 返回HTTP版本 HTTPHeaderName - returns value of the specified HTTP header. HTTPHeaderName can be any valid HTTP header name. Header names should include the trailing colon ":". If specified header does not exists in a client's request TestVerb is treated as empty string. 返回特定义的HTTP头文件的值
ServerVariable 返回特定义的服务器变量的值 。例如服务器端口,全部服务器变量列表应在IIS文档中建立,变量名应用%符预定; CondPattern The regular expression to match TestVerb 规则表达式匹配TestVerb
Code: [Flags] Flags is a comma-separated list of the following flags:
O (nOrmalize)
Normalizes string before processing. Normalization includes removing of an URL-encoding, illegal characters, etc. This flag is useful with URLs and URL-encoded headers
I (ignore case) 不管大小写强行指定字符匹配,这个FLAG影响RewriteRule指令和相应的RewriteCond 指令 F (Forbidden) 对客户端做反应,停止REWRITING进程并且发送403错误,注意在这种情况下FORMATSTRING 是无用的并可以设置为任何非空字符串。 L (last rule) 不应用任何重写规则在此停止重写进程,使用这个FLAG以阻止当前被重写的URI被后面的规则再次重写 N (Next iteration) 强制REWRITINGENGINE调整规则目标并且从头重启规则检查(所有修改将保存),重启次数由RepeatLimit指定的值限制,如果这个数值超过N FLAG将被忽略
NS (Next iteration of the same rule) 以N标记工作不从相同的规则重启规则规则进程(例如强制重复规则应用),通过RepeatLimit指令指定一个反复实行某一规则的最大数目,
R (explicit redirect) 强制服务器对客户端发出重定向指示即时应答,提供目的URI的新地址,重定向规则经常是最后规则 RP (permanent redirect) 几乎和[R]标记相同但是发布301HTTP状态而不是302HTTP状态代码 U (Unmangle Log) 当URI是源需求而不是重写需求时记载URI O (nOrmalize) 在实行之前标准化字符串。标准化包括URL-ENCODING,不合法的字符的再移动等,这个标记对于URLS和URLS-ENDODED头是有用的 CL (Case Lower) 小写 CU (Case Upper) 大写