根据来路网址关键词跳转的php代码
<?php
if(isset($_SERVER['HTTP_REFERER'])){
$_host=urldecode ($_SERVER['HTTP_REFERER']);
$key="关键词";
if(strpos($_host,$key))
{
header("Location:http://a.com/");
exit();
}
}
?>
根据来路网址关键词跳转的php代码
<?php
if(isset($_SERVER['HTTP_REFERER'])){
$_host=urldecode ($_SERVER['HTTP_REFERER']);
$key="关键词";
if(strpos($_host,$key))
{
header("Location:http://a.com/");
exit();
}
}
?>
转载于:https://www.cnblogs.com/lxu220/archive/2012/06/25/2561154.html