Websites sometimes have illegal visits or meaningless visits, such as garbage spiders (Spider-Spider, Sogou spider, etc.), and when the site visits are large, spiders ' access increases the burden on the server and loses performance. For not necessary search engines, can be banned, and for Baidu, Google, etc. can be retained
prohibited Search Engine method: through the rewrite module implementation, such as the ban Sogou spider access to the site, add the following red field
<ifmodule mod_rewrite.c>
Rewriteengine on
Rewritecond%{http_host} ^www.aaa.com$ [OR]
Rewritecond%{http_host} ^www.bbb.com$ [OR]
Rewritecond%{http_host} ^www.ccc.com$
Rewriterule ^/(. *) $ http://www.test.com/$1 [r=301,l]
Rewritecond%{http_user_agent} ^.*sogou.* [NC]
Rewriterule. *-[F]
</IfModule>
Description: [NC] means case insensitive, [F] means forbidden forbidden
Try to use Sogou browser to visit any page of the site will show 403 Forbidden, so don't worry about garbage spider trouble
This article is from the "Parody Games" blog, so be sure to keep this source http://kevinjin117.blog.51cto.com/11655131/1835360
Lamp-apache prohibit designation of User_agent