http referer

General discussions related to php

Moderators: egami, macek, gesf

Post Reply

Tue Oct 22, 2002 1:50 am

I have simplified the problem to make it a bit more clear :) So the problem might look a bit weird.

in "page1.php" I got a link to "page2.php"

contents of "page2.php":

Code: Select all


HTTP-Referer is "page1.php"

page2.php automaticly sends the user to page3.php.
In page3.php HTTP-Referer is "page2.php"

How do I make the referer on page3.php to be "page1.php"?
Do I need to send a header for that? If so, wich?

Greetz Daan


Tue Oct 22, 2002 3:21 am

Don't know if you can do it with a header variable, but why don't you use a session variable or append it to the page to make a get variable?


Fri Oct 25, 2002 2:03 am

All subdomains end up in the same folder at my server (I want it that way :))
When a user requests a subdomain that doesn't exist, I automaticly forward using header('location: ..'); to the portal of my site.
In this process the referer is lost and it doesn't end up in my site statistics (nedstat).
I'm trying to get the referer to pass on to the next page.

Greetz Daan


Fri Oct 25, 2002 2:55 am

Ahh, you didn't mention if the subdomain doesn't exist. Try using a custom 404 page. Your logging software should pick up the 404 and where it came from!

Post Reply