当前位置:首页 » 好文分享 » 详情

    黑帽SEO,给搜索蜘蛛和用户不同的页面

    介绍一下这种seo方法

    判断来路是搜索蜘蛛就让蜘蛛看到全部的页面代码,如果判断来路是真实的用户则跳转到注册页或者其他页面,既能达到想要的效果,又能做良好的seo优化,岂不是两全其美嘛...
    <?php
    $http = false;
    $http1 = $_SERVER['HTTP_USER_AGENT'];
    if(strpos($http1, 'Googlebot') !== false){
    $http = true;
    } else if(strpos($http1, 'Baiduspider') >0){
    $http = true;
    } else if(strpos($http1, 'Yahoo! Slurp') !== false){
    $http = true;
    } else if(strpos($http1, 'msnbot') !== false){
    $http = true;
    } else if(strpos($http1, 'Sosospider') !== false){
    $http = true;
    } else if(strpos($http1, 'YodaoBot') !== false || strpos($http1, 'OutfoxBot') !== false){
    $http = true;
    } else if(strpos($http1, 'Sogou web spider') !== false || strpos($http1, 'Sogou Orion spider') !== false){
    $http = true;
    } else if(strpos($http1, 'fast-webcrawler') !== false){
    $http = true;
    } else if(strpos($http1, 'Gaisbot') !== false){
    $http = true;
    } else if(strpos($http1, 'ia_archiver') !== false){ 
    $http = true;
    } else if(strpos($http1, 'altavista') !== false){
    $http = true;
    } else if(strpos($http1, 'lycos_spider') !== false){
    $http = true;
    } else if(strpos($http1, 'Inktomi slurp') !== false){
    $http = true;
    } else if(strpos($http1, 'googlebot-mobile') !== false){
    $http = true;
    } else if(strpos($http1, '360Spider ') !== false){
    $http = true;
    } else if(strpos($http1, 'haosouspider') !== false){
    $http = true;
    } else if(strpos($http1, 'Sogou News Spider') !== false){
    $http = true;
    } else if(strpos($http1, 'YoudaoBot') !== false){
    $http = true;
    } else if(strpos($http1, 'bingbot') !== false){
    $http = true;
    } else if(strpos($http1, 'YisouSpider') !== false){
    $http = true;
    } else if(strpos($http1, 'ia_archiver') !== false){
    $http = true;
    } else if(strpos($http1, 'EasouSpider') !== false){
    $http = true;
    } else if(strpos($http1, 'JikeSpider') !== false){
    $http = true;
    } else if(strpos($http1, 'Sogou blog') !== false){
    $http = true;
    }
    if($http == false){
    header("Location: https://www.blogs.hk/");
    exit();
    }
    ?>

    以上代码包含了各大主流搜索引擎的蜘蛛,把其中https://www.blogs.hk替换为你的网址即可,这段代码可以放在index.php文件中,或者网站的头部文件中即可。
    打赏
    X
    打赏方式:
    • 支付宝
    • 微信
    • QQ红包

    打开支付宝扫一扫
    日期:2019年01月28日 09:17:31 星期一   分类:好文分享   浏览(38473)
    本文地址:https://www.blogs.hk/post-4117.html   [百度已收录]
    声明:本页信息由网友自行发布或来源于网络,真实性、合法性由发布人负责,请仔细甄别!本站只为传递信息,我们不做任何双方证明,也不承担任何法律责任。文章内容若侵犯你的权益,请联系本站删除!
    版权所有:《博客之家
    文章标题:《黑帽SEO,给搜索蜘蛛和用户不同的页面
    除非注明,文章均为 《博客之家》 原创
    转载请注明本文短网址:https://www.blogs.hk/post-4117.html  [生成短网址]

        站点统计

        • 收录网址:3370 个
        • 发布文章:3008 条
        • 在线人数:1人
        • 总访问量:270545667次
        • 本站运行:12年5月3天
        Copyright © 2025 博客之家 版权所有  
        關於本站免責聲明sitemap新站登錄