nginx中,$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 u r i f o r t h e p o s t − r e w r i t e / a l t e r e d U R I . D o e s n o t i n c l u d e h o s t n a m e . E x a m p l e : " / f o o / b a r . p h p ? a r g = b a z " 这 个 变 量 等 于 从 客 户 端 发 送 来 的 原 生 请 求 U R I , 包 括 参 数 。 它 不 可 以 进 行 修 改 。 uri for the post-rewrite/altered URI. Does not include host name. Example: "/foo/bar.php?arg=baz" 这个变量等于从客户端发送来的原生请求URI,包括参数。它不可以进行修改。 uriforthepostrewrite/alteredURI.Doesnotincludehostname.Example:"/foo/bar.php?arg=baz"URIuri变量反映的是重写后/改变的URI。不包括主机名。例如:"/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 the index module. Note this may be different from $request_uri, as r e q u e s t u r i i s w h a t w a s o r i g i n a l l y s e n t b y t h e b r o w s e r b e f o r e a n y s u c h m o d i f i c a t i o n s . D o e s n o t i n c l u d e t h e p r o t o c o l o r h o s t n a m e . E x a m p l e : / f o o / b a r . h t m l 这 个 变 量 指 当 前 的 请 求 U R I , 不 包 括 任 何 参 数 ( 见 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 这个变量指当前的请求URI,不包括任何参数(见 requesturiiswhatwasoriginallysentbythebrowserbeforeanysuchmodifications.Doesnotincludetheprotocolorhostname.Example:/foo/bar.htmlURI(args)。这个变量反映任何内部重定向或index模块所做的修改。注意,这和 r e q u e s t u r i 不 同 , 因 request_uri不同,因 requesturirequest_uri是浏览器发起的不做任何修改的原生URI。不包括协议及主机名。例如:"/foo/bar.html"

  • $document_uri
    The same as u r i . 同 uri. 同 uri.uri.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值