SMF Support > SMF 1.1.x Support
How to block baidu spider?
j_jindal1:
Nice piece of information DavidCT .. Thanks. I was looking for something similar.. :-)
clyde4210:
Blocking IP's is not a good idea unless you are being hit by a spammer. You should use Rewrite rules for blocking Spiders/Bots. Below is what I put in my .htaccess.
--- Code: ---RewriteCond %{HTTP_USER_AGENT} Baiduspider
RewriteRule ^.*$ http://127.0.0.1 [R,L]
--- End code ---
OR
--- Code: ---RewriteCond %{HTTP_USER_AGENT} Baidu
RewriteRule ^.*$ http://127.0.0.1 [R,L]
--- End code ---
Arantor:
That actually consumes (quite a bit) more processing power than a simple block does, meaning more resources are taken up dealing with Baidu than necessary.
Plus it doesn't show the forum as forbidden that way.
clyde4210:
It will consume a lot less then constantly chasing down the bots IP's. Not to mention by blocking a range as stated previously, you would be blocking legit users as well. Thirdly when the bot switches ranges because they have more than 1 range of octets you would be sent blocking those.
Block it once with rewrite rules and be done with it. I don't use this CMS. I was searching about Badui. I swore I have saw it before and found this post about it. Seen posts of how to block it and seen that it would be time consuming not to mention could take as much processing power with all the IP blocking.
Sorry if you disagree but in the end, the logical action should be taken using rewrite rules.
Arantor:
Oh, disagreement is fine. There are good reasons to not do it as an IP block - and those are it.
But, there are problems with rewrite rules too, it's not a single master solution. Plus some users don't have mod_rewrite enabled, especially on shared hosting, or even run on Apache.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version