Incorrect $request_filename in 1.0.5?

Ensiferous nginx-forum at nginx.us
Sun Aug 28 06:27:07 UTC 2011


$request_filename will change when you rewrite the request, even if you
just do an internal rewrite.
$request_filename is defined as root or alias directive + current URI.

So if you have a root defined as /var/www/testsite and you redirect to
index.php then you'll get /var/www/testsiteindex.php

URIs in Nginx always start with a / so it's generally a good idea to
rewrite to /index.php instead of index.php

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



More information about the nginx mailing list