[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] How to stop rewrite URL on 404 error
- Subject: Re: [cobalt-users] How to stop rewrite URL on 404 error
- From: Greg Hewitt-Long <greg@xxxxxxxxxxxxxxxxxxx>
- Date: Mon Sep 24 13:26:02 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
>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
--
http://www.webyourbusiness.com/
Providers of E-Commerce Software &
Web Design Consultancy and Services.
PH: (970)266-0195 FAX: (970)266-0158