Hiding / clearing referer header

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
User avatar
batfastad
Forum Contributor
Posts: 433
Joined: Tue Mar 30, 2004 4:24 am
Location: London, UK

Hiding / clearing referer header

Post by batfastad »

Hi guys

I'm slowly developing an intranet application for a company database, and on the company information pages, that company's website is displayed as a link which opens in a new window using target=_blank

The problem is, the address of the intranet interface will be plastered all over the referrer header and possibly saved in the web stats and logs of whatever website was visited.

One solution I've got going on at the moment is to have a redirect script on our main website called redir.php - the link from the intranet goes to http://www.ourwebsite.com/redir.php?sit ... ebsite.net

Then the redir.php script just does this...

Code: Select all

header("Location: http://www.otherwebsite.net");
... to redirect to the other website.

Is that enough to hide the location of our intranet pages from the referrer header?
Or is there a better way to clear / change the referrer header?

With my test redirects I still get the location of our intranet pages appearing in our web stats.

Any ideas / suggestions?

Thanks

Ben
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Configure your gateway server to strip the referrer header.
Post Reply