redirect all bots using htaccess apache

前端 未结 1 1989
死守一世寂寞
死守一世寂寞 2020-12-10 09:54

What .htaccess rewriterule should i use to detect known bots, for example the big ones:

altavista, google, bing, yahoo

I know i can check fo

相关标签:
1条回答
  • 2020-12-10 10:11
    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]
    
    0 讨论(0)
提交回复
热议问题