-
$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,包括参数。它不可以进行修改。 uriforthepost−rewrite/alteredURI.Doesnotincludehostname.Example:"/foo/bar.php?arg=baz"这个变量等于从客户端发送来的原生请求URI,包括参数。它不可以进行修改。uri变量反映的是重写后/改变的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.html这个变量指当前的请求URI,不包括任何参数(见args)。这个变量反映任何内部重定向或index模块所做的修改。注意,这和 r e q u e s t u r i 不 同 , 因 request_uri不同,因 requesturi不同,因request_uri是浏览器发起的不做任何修改的原生URI。不包括协议及主机名。例如:"/foo/bar.html" -
$document_uri
The same as u r i . 同 uri. 同 uri.同uri.
nginx中,$request_uri和$uri的区别
最新推荐文章于 2024-08-22 09:33:31 发布