Removing $_SERVER["HTTP_REFERRER"]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nutkenz
Forum Contributor
Posts: 155
Joined: Tue Jul 19, 2005 12:25 pm

Removing $_SERVER["HTTP_REFERRER"]

Post by nutkenz »

Here's my problem; I have a website which redirects visitors from one place to somewhere else and gathers some data while doing that. One problem is that, probably because I'm using a header redirect, the HTTP_REFERER does not change. I want the site where I'm sending to either see my site as referrer or not see a site as referrer at all. Is this possible? Because as far as I know the information is stored and sent by the browser and cannot be manipulated in PHP. I've seen some pretty clever things in the past though, like a PHP browser detection class, so I thought I'd ask anyway. If someone knows a JavaScript way to get this done, that's almost as good :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Use a page level redirection.
nutkenz
Forum Contributor
Posts: 155
Joined: Tue Jul 19, 2005 12:25 pm

Post by nutkenz »

The problem is that the visitor should not see that he's being redirected, and neither should for example the google bot. As far as I know, that can only be accomplished with the header() redirect.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Unless you build your script as a proxy, you have to choose one or the other.
nutkenz
Forum Contributor
Posts: 155
Joined: Tue Jul 19, 2005 12:25 pm

Post by nutkenz »

k, thanks for the info
Post Reply