PR劫持

header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.google.com/');

$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);

if (strpos($useragent, 'googlebot')!== false){
return 'Googlebot';
}

 

判断是否为蜘蛛 做301重定向

评论关闭