How to check a request is subrequest or not?

elmo1349 nginx-forum at nginx.us
Wed Jul 21 05:22:06 MSD 2010


As there are two variables in http core module:

$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. 

$uri
This variable is equal to current URI in the request (without arguments,
those are in $args.) It can differ from $request_uri which is what is
sent by the browser. Examples of how it can be modified are internal
redirects, or with the use of index. 

They are different at subrequest or internal redirects, but it is
impossible to define is subrequest or not at server{} part ?

Can I compare some variables to do so?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,110862,111134#msg-111134




More information about the nginx mailing list