http referer

General discussions related to php

Moderators: macek, egami, gesf

DoppyNL

http referer

Postby DoppyNL » 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

<?php
header('location: http://domain.com/page3.php');
?>

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

Jay

Postby Jay » 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?

DoppyNL

Postby DoppyNL » 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

Jay

Postby Jay » 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!


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 2 guests

cron