SMF Support > SMF 1.1.x Support
How to block baidu spider?
DavidCT:
--- Quote from: peps1 on November 28, 2009, 11:33:40 AM ---The baidu spider are still crawl the forum.....50 ever couple of hours.
Is there a way to just block the ip range 220.181.7.*** ?
--- End quote ---
220.x.x.x is NOT Baidu, it's a spammer (EDIT: harvestor, more than likely) pretending to be. Baidu uses 119.63.192.0 - 119.63.199.255.
220.181.0.0 - 220.181.255.255 = CHINANET Beijing province network
Many ways through htaccess to block them, one way is:
--- Code: ---<Files *.*>
order allow,deny
allow from all
deny from 220.181.
</Files>
--- End code ---
Doing this will block the entire range, no matter who is using it. You can use RewriteCond with rules - if this range and this user-agent, don't allow, but I don't want to quote you a rule without testing it out first as I'm no pro with that stuff.
Find out more at APNIC
peps1:
Thankyou for all your help!
but....umm....where do I put that code? :-\
DavidCT:
As I said in .htaccess, assuming you can use it. If you don't have one yet, make one using notepad - it's just a text file. Upload it to your root folder. The "." period in front of it tells linux it's a hidden file.
peps1:
Done :)
they are still showing up a guests, but seem restricted to "Viewing the board index of [My Site]".
Guess there is no way to stop them from even getting that far, and stop them showing up as guests?
DavidCT:
If you did it right they shouldn't get near your forum.
Like I said I'm no pro... I think I forgot a very important thing :(
Before that block, add this:
--- Code: ---RewriteEngine On
--- End code ---
I don't know if it's needed for that or just RewriteCond/Rule stuff. Give it a try.
To test it, block yourself too. Add another deny from line with your entire IP address. You'll see your IP in WHO'S ONLINE.
EDIT:
Actually, no that line isn't needed for that. Make sure it's spelled .htaccess and placed in your root folder. You can place it in your forum folder, but it'll only protect that folder and anything beyond it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version