Shaun Posted April 28, 2010 Share Posted April 28, 2010 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 Link to comment https://forums.phpfreaks.com/topic/200073-pulling-my-hair-out-over-header-location-and-referal-information/ Share on other sites More sharing options...
mrMarcus Posted April 28, 2010 Share Posted April 28, 2010 you answered your own question. http_referer is passed by the browser, and since header() is passed by the server, before any output to the browser, no http_referer is set. the browser is never in play. Link to comment https://forums.phpfreaks.com/topic/200073-pulling-my-hair-out-over-header-location-and-referal-information/#findComment-1050093 Share on other sites More sharing options...
Shaun Posted April 28, 2010 Author Share Posted April 28, 2010 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 Link to comment https://forums.phpfreaks.com/topic/200073-pulling-my-hair-out-over-header-location-and-referal-information/#findComment-1050153 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.