HI. I'm trying to make my 404 page catch pages with bad URLs.

Basically, I'm trying to make it send me a mail saying:

A link leading from $HTTP_REFERER to $REDIRECT_URL returned a 404.

I have no problem with $HTTP_REFERER but $REDIRECT_URL returns nothing.

This is my script, which is pointed to by a .htaccess.


echo ("$HTTP_REFERER");

echo ("<p><b>$REDIRECT_URL<b>");


This doesnt do the mailing, I was just testing out the variables.

Please help. Thanks.