>I'm trying to write a custom 404 Not Found error page, with a PHP script
>that will e-mail me with the URL the visitor was trying to reach. If I put
>"ErrorDocument 404 /notfound.php" in the .htaccess file for the site, the
>URL in the browser will rewrite to http://www.mysite.com/notfound.php
>regardless of what I type in for a bogus page to generate a 404 error. In
>the e-mail, the $HTTP_REFERER variable will return nothing (that's if I just
>type a nonexistent URL in the browser), and the $REQUEST_URI variable will
>return /notfound.php.
I don't know how you have your RAQ configured, but I have a file called
404err.shtml as my 404 documents (defined in .htaccess, as you suggest) -
and this page calls a referrer recording CGI script - it's a snip -
nothing to it.
I read:
REDIRECT_REDIRECT_SCRIPT_URI=http://www.webyourbusiness.com/asdadadasdasd
REDIRECT_REDIRECT_SCRIPT_URL=/asdadadasdasd
REDIRECT_REDIRECT_URL=/asdadadasdasd
REDIRECT_REQUEST_URI=/asdadadasdasd
REDIRECT_SCRIPT_URI=http://www.webyourbusiness.com/asdadadasdasd
REDIRECT_SCRIPT_URL=/asdadadasdasd
REDIRECT_SERVER_ADMIN=admin
REQUEST_URI=/asdadadasdasd
SCRIPT_URI=http://www.webyourbusiness.com/asdadadasdasd
SCRIPT_URL=/asdadadasdasd
By placing a call to env in the .shtml file, I saw all of the above
environments variables with my fictitious URL in it - take your pick.
Greg
--