Page 1 of 1

Help - Redirect and include a referer.

Posted: Wed Sep 13, 2006 9:23 pm
by Dr.Goodvibes
I am try to redirect to a new site and include a referer which I have modified..

I do not want to include the referer as part of the url. I want the referer to be part of the header so that the site I have redirected to can see the referer within the $_SERVER['HTTP_REFERER'] call.

I have looked at the follow:

Code: Select all

header (“referer: http://www.mysite.com”);
header(“location: http://www.newsite.com”);
This however does not forward the referer but uses the referer generated by the redirect and comes out as the url I was at when I redirected.

I have looked at cURL and it does send the referer however I’m not redirected to the new site. I am still in a shell in my own site.

Looking at fsockopen() I believe the outcome will be the same as cURL.

Is there any way of redirecting to a new site and have the ability to include a referer in the header which I have been able to modify before the redirect?

Thank you in advance for any ideas or help.

Posted: Wed Sep 13, 2006 9:36 pm
by feyd
The referrer isn't dictated by the server.