in reply to $ENV{HTTP_REFERER}; not showing up

I see nothing syntactically wrong with your capturing of $ENV{HTTP_REFERER} into $location. Just to be safe, try outputting the contents of $ENV{HTTP_REFERER} to a logfile of some sort early on in your script to ensure that it is the same as the value you are working with in $location later in the script. ...never hurts to check that sort of thing.

But as others have mentioned, never rely entirely on the $ENV{HTTP_REFERER} value being set to what you think it should be. Browsers may not provide the info, or proxies may strip it away. In fact, a script acting as a browser could even spoof the HTTP_REFERER value. It's simply not reliable.


Dave