Jump to content

Pulling my hair out over header( "Location: and referal information


Shaun

Recommended Posts

Hi folks, im in a spot of bother and I really hope someone can help me out here.

 

So I understand that http_referer is passed by your browser and not the server. I also understand that you can have some trouble with referals on the same domain so I tested this on two different domains. I also tested three browsers, FireFox, Chrome, and IE. But I still cannot view the referal information when my php script uses header("location:....  There is no problem if I use actual html links. I have tried forcing the http status as 200, 301, 303 and still nothing. I have no idea why the browser will not pass this information along.

 

The first page on domain1.com:

<?php header( "Location: http://domain2.com" ); ?>

 

The second page on domain2.com:

<?php echo $_SERVER['HTTP_REFERER']; ?>

 

thank you all very much for your time, it is most appriciated! :)

 

- Shaun

Thank Marcus, I was starting to think the same. It's strange how its handled, I managed to find some info about using python instead. Ill leave a link here should anyone need it for reference. http://code.google.com/p/ga-demos/wiki/GaRedirects

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.