$request_uri和$uri

简介: $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 in

$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

 

目录
相关文章
|
3月前
|
数据安全/隐私保护
URI 和URL 的区别是什么?
URI 和URL 的区别是什么?
|
4月前
|
PHP
URI和URL的区别
URI和URL的区别
|
11月前
URL、URI、URN详解
URI 属于 URL 更高层次的抽象,一种字符串文本标准。 就是说,URI 属于父类,而 URL 属于 URI 的子类。URL 是 URI 的一个子集。 二者的区别在于,URI 表示请求服务器的路径,定义这么一个资源。而 URL 同时说明要如何访问这个资源。
URI、URL、URN是什么?
URI、URL、URN是什么?
166 0
URI、URL、URN是什么?