rewrite标志--收集
原创woxuewangluo 博主文章分类:APP运维文档 ©著作权
©著作权归作者所有:来自51CTO博客作者woxuewangluo的原创作品,请联系作者获取转载授权,否则将追究法律责任
http://wyllife.blog.163.com/blog/static/41163901201010251101326/
rewrite标志
R [=code](force redirect) 强制外部重定向
强制在替代字符串加上http://thishost[:thisport]/前缀重定向到外部的URL.如果code不指定,将用缺省的302 HTTP状态码。
F (force URL to be forbidden)禁用URL,返回403HTTP状态码。
G (force URL to be gone) 强制URL为GONE,返回410HTTP状态码。
P (force proxy) 强制使用代理转发。
L (last rule) 表明当前规则是最后一条规则,停止分析以后规则的重写。
N (next round) 重新从第一条规则开始运行重写过程。
C (chained with next rule) 与下一条规则关联
如果规则匹配则正常处理,该标志无效,如果不匹配,那么下面所有关联的规则都跳过。
T =MIME-type(force MIME type) 强制MIME类型
NS (used only if no internal sub-request) 只用于不是内部子请求
NC (no case) 不区分大小写
QSA (query string append) 追加请求字符串
NE (no URI escaping of output) 不在输出转义特殊字符
例如:RewriteRule /foo/(.*) /bar?arg=P1\=$1 [R,NE] 将能正确的将/foo/zoo转换成/bar?arg=P1=zed
PT (pass through to next handler) 传递给下一个处理
上一篇:SHELL-清空httpdlog
下一篇:MonGo---安装及其基本操作

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
收集nginx rewrite的一些实例
收集nginx rewrite的一些实例
实例 nginx rewrite -
【Canvas与标志】绘制chrome标志
用Html5/Canvas绘制Chrome标志。
canvas chorme 标志 -
nginx rewrite 测试 nginx rewrite规则
nginx通过ngx_http_rewrite_module模块支持url重写、支持if条件判断,但不支持else。 该模块需要PCRE支持,应在编译nginx时指定PCRE源码目录,nginx安装方法。 nginx rewrite指令执行顺序: 1.执行server块的rewrite指令(这里的块指的是server关键字后{}包围的区域,其它xx块类似) 2.执行location匹配 3.执行
nginx rewrite 测试 linux linux nginx nginx rewite nginx rewite 规则