turbotec
BANNED
- Apr 5, 2008
- 181
- 15
so I am currently using a php script to check referrer and then redirect accordingly.
SO, right now if the referrer is "http://www.mysite.com/test/testreferrerredirect.php" than it will do what I want. Here is my question though. I want it to redirect to the correct site IF the referrer is anywhere from "mysite.com" not just the php page above. does this make sense?? I tried just making the value equal "http://www.mysite.com/" but it didnt work. how can I change the script to redirect if it is coming from anywhere on the mysite.com page??
Code:
<?php
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "http://www.mysite.com/test/testreferrerredirect.php")
{
echo '<meta http-equiv="refresh" content="0;url=http://www.pyromosh.org/images/bbs/have_a_cookie.gif">';
}
else
{
echo '<meta http-equiv="refresh" content="0;url=http://www.youfail.org/">';
}
?>
SO, right now if the referrer is "http://www.mysite.com/test/testreferrerredirect.php" than it will do what I want. Here is my question though. I want it to redirect to the correct site IF the referrer is anywhere from "mysite.com" not just the php page above. does this make sense?? I tried just making the value equal "http://www.mysite.com/" but it didnt work. how can I change the script to redirect if it is coming from anywhere on the mysite.com page??