Redirects and HTTP Referer Issues

Hello everyone,

First of all, let me just say that I’m not a very experienced PHP developer.

Now, I’m writing a basic system to integrate dynamic behaviors into my website.

I’m using .htaccess to redirect a certain page to my script.

The problem with this is that my script depends on the following:


which seems to have no value when the page is redirected using .htaccess.

Can anyone offer any solutions as to how I can make the above PHP variable contain the redirected URL as the referer after being redirected?

Presumably it was resolved by removing the dependency on a field that can be set to anything but as the OP didn’t say how they resolved it there will be others who make the same mistake who would have been able to avoid it had the OP’s solution been posted.

You should not have your script depend on HTTP Referer to begin with.

This has been resolved.