【问题标题】:redirect all bots using htaccess apache使用 htaccess apache 重定向所有机器人
【发布时间】:2011-02-11 03:03:03
【问题描述】:

我应该使用什么 .htaccess rewriterule 来检测已知机器人,例如大型机器人:

altavista、谷歌、必应、雅虎

我知道我可以检查他们的 ips 或主机,但是有更好的方法吗?

【问题讨论】:

    标签: apache .htaccess bots web-crawler


    【解决方案1】:
    RewriteCond %{HTTP_USER_AGENT} AltaVista [OR]
    RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
    RewriteCond %{HTTP_USER_AGENT} msnbot [OR]
    RewriteCond %{HTTP_USER_AGENT} Slurp
    RewriteRule ^.*$ IHateBots.html [L]
    

    【讨论】:

      猜你喜欢
      • 2013-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多