original filename not getting to 403 error page

ianevans at digitalhit.com ianevans at digitalhit.com
Sat Jan 13 10:19:29 MSK 2007


Hi there...just checking if I have my 403 error call set up incorrectly.

I have my 403 set up with:

error_page 403 /dhe403.shtml;

and the referers checked with:

valid_referers none  blocked  *.digitalhit.com digitalhit.com
*.othersite.com;
if ($invalid_referer) {
return   403;
}

This is inside the location for the static files, which are served
directly by nginx.

When the 403 happens the php variable (.shtml is treated as .php by the
Apache backend) $_SERVER["REQUEST_URI"] is coming back as "/dhe403.shtml"
instead of the image file being requested.

Oddly enough, the 404 error page is getting the $_SERVER["REQUEST_URI"] as
the filename being requested, so its working as expected

Any reason why the 403 page's $_SERVER["REQUEST_URI"] is wrong but it's
working for the 404? Is the original requested filename not getting passed
back to Apache for some reason?

Thanks.






More information about the nginx mailing list