|
Posted by Adam on 10/18/57 11:51
On Sun, 18 Jun 2006 13:11:49 +1200, Adam wrote:
>There must be a way to trap this in PHP, Shirley?
To answer my own post (sure sign of madness!):
http://httpd.apache.org/docs/2.1/mod/core.html#errordocument
If your ErrorDocument startswith http:// Apache sends a redirect (302)
to the error document, hence ***losing your original referer***. If
your ErrorDocument points to a relative path, 404 is maintained and so
are your variables.
I was using "http://" in my .htaccess - so $_SERVER['REQUEST_URI'] was
giving me the wrong value.
Using *relative* paths in .htaccess cured the problem - I now get a
full error URL passed to my error.php ... YAY!
Adam.
Navigation:
[Reply to this message]
|