$request_uri和$uri

7 篇文章 0 订阅

$request_uri

This variable is equal to the *original* request URI as received from the client including the args. It cannot be modified. Look at $uri for the post-rewrite/altered URI. Does not include host name. Example: "/foo/bar.php?arg=baz"

$uri

This variable is the current request URI,without any arguments(see $args for those). This variable will reflect any modifications done so far by internal redirects or theindex module. Note this may be different from $request_uri, as $request_uri is what was originally sent by the browser before any such modifications. Does not include the protocol or host name. Example:/foo/bar.html

$args

This variable is the GET parameters in request line, e.g.foo=123&bar=blahblah; This variable could be changed.

 

You can check them by adding the variable in log_format and finding out the value in the tail of access.log ! Do you get it??It's amazing!!!

 

Appendix

http://wiki.nginx.org/HttpCoreModule#.24request_uri

http://blog.sina.com.cn/s/blog_4ff12f66010158lk.html

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值