需要屏蔽一些国外没用的搜索引擎,在网上看到的这样代码可以用吗 悬赏5元 已结束
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "ADmantX|YisouSpider|BLEXBot|MSNbot|Webdup|AcoonBot|AhrefsBot|BacklinkCrawler|BPImageWalker|check_http|dotbot|DLE_Spider.exe|Ezooms|EMail Exractor|Exabot|EdisterBot|EC2LinkFinder|GbPlugin|HolmesBot|ichiro|Infoseek SideWinder|jikespider|linkdex.com|Purebot|MJ12bot|MLBot|MauiBot|moget|MegaIndex.ru|NaverBot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|rmnbot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|curl|perl|Python|Wget|Xenu|ZmEu" [NC]
RewriteRule ^(.*)$ http://127.0.0.1/$1 [R=301,L]
这是网上看到的代码,加在网站根目录的.htaccess下,不知道以上代码有没错误,有高手指点下吗?