turbotec
BANNED
- Apr 5, 2008
- 181
- 15
so I am using this script to redirect users if they have a blank referrer:
NOW here is my question. this code above sends users to www. yahoo.com IF the referrer is blank. how can I get it to redirect if and only if the Referrer is http://www.ABC123.com/index.htm
I tried putting in http://www.ABC123.com/index.htm inbetween the "" in the above code, but it only goes to the 'else' page even when the real referrer is http://www.ABC123.com/index.htm
Code:
?php
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "")
{
echo '<meta http-equiv="refresh" content="0;url=http://www.yahoo.com">';
}
else
{
echo '<meta http-equiv="refresh" content="0;url=http://www.google.com">';
}
?>
NOW here is my question. this code above sends users to www. yahoo.com IF the referrer is blank. how can I get it to redirect if and only if the Referrer is http://www.ABC123.com/index.htm
I tried putting in http://www.ABC123.com/index.htm inbetween the "" in the above code, but it only goes to the 'else' page even when the real referrer is http://www.ABC123.com/index.htm