-
PHP Redirect issue
What would be the coded that would be needed to redirect a user and still show its refer?
I am bouncing unwanted traffic off my proxy sites and sending them to my proxy list. Now in my proxy list the visitor counts are increasing but when I look at the refer links its not showing the sites I would have to say it showing as direct type in.
I am assuming the script needs to return the refer header but I cant seem to find any that work or do this.
-
You must be using a meta refresh or something like that which is blanking the referrer. You want some thing like below to keep the referrer.
Code:
<?php
header("Location: http://www.mywebsite.com");
?>
-
Beware of security !
Code:
<?php
header("Location: http://www.mywebsite.com");
exit;
?>
Hackers can't stop the redirection now.
Thanks
-
The referer header is set by the client so you can't do it through php.
This seems like a pretty good solution.
Code:
print "<html><head><title>redirect</title><meta http-equiv=\"Refresh\" content=\"0; URL=$url\"><head><body onLoad=\"javascript: window.location='$url';\">$url</body></html>";
Where $url is where you want to redirect to.
That will allow the url of the script that does the redirecting to show up as the referer.