In many cases, access to an IP can easily result in CPU 100% (for example, some search engine's fixed crawl, others a large number of collection site), this time we have to use some effective means to seal off the other side of the IP, so that he can not consume the resources of the server, IP method There are many kinds of, if your WEB server Install the Rewrite module, you can also try to use the Rewrite rules to seal off each other's IP.
1, for example, we redirect a specific IP directly to Baidu homepage, in the site root directory of the. htaccess file to add code:
Rewritecond%{remote_addr} 123.123.123.123 [NC]
Replace 123.123.123.123 This IP with the IP you want to restrict
2, if you want to implement multiple IP, you can write this:
Rewritecond%{remote_addr} 123.123.123.123 [OR]Rewritecond%{remote_addr} 124.124.124.124 [NC]
Rewriterule ^ (. *) $ http://www.baidu.com/$1 [r=301]