Beginner question:Nginx request_uri meaning ?

tokers nginx-forum at forum.nginx.org
Mon Jan 23 09:15:05 UTC 2017


$request_uri is a built-in variable of Nginx, which meaning is the pure uri
in HTTP request line without any process.

For instance, if the HTTP request line is "GET /path/to//a.jpg HTTP/1.1",
the $request_uri is "/path/to//a.jpg". But the $uri will be "/path/to/a.jpg"
if merge_slashes is enable.

if the HTTP request line is "GET /path%2Fto/a.jpg HTTP1/1.", the
$request_uri is "/path%2Fto/a.jpg". But the $uri will be "/path/to/a.jpg".

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,271937,272108#msg-272108



More information about the nginx mailing list