Quote:
Originally Posted by 081806
Hey THANKS for that tip. I can go test it out on myself. Luckily my isp provides multiple IPs for my one account.
|
Quote:
Originally Posted by 081806
Woo hoo, no more googlebots. Now if somebody knows how I can block the whole of Russia, China, Taiwan, India, etc. Other than com.ru, com.cn etc.
|
Unfortunately many of these countries don't have neat netblocks of IP addresses, so it's pretty hard to block all visitors of that country. What you
can do, however, is block certain language settings in browsers. If you wanted to redirect everyone with their language set to Russina, Chinese, Taiwanese, Indian, etc... you could set something up like the following in your .htaccess file:
Code:
RewriteEngine on
RewriteCond %{HTTP:Accept-Language} (ru|cn|tw|in) [NC]
RewriteRule .* http://www.google.com [R,L]
That would send them all to Google.com instead.
Attached you'll find a list of IP netblocks for each country that I'd recommend blocking. You can just copy and paste their contents into the .htaccess file. The China.txt file also contains some Taiwanese netblocks.
I really hope you can make use of them because it took me at least an hour to make each one. Seriously.
Otherwise you can take the easy route and block most by doing something like:
Code:
deny from .ru
deny from .cn
deny from .tw
deny from .in
Was there some reason that you didn't want to go that route?
Oh, and I've also uploaded the IP block files to my website in case I ever remove the attachments. You may find them here:
http://www.thewired.tk/misc/russia.txt
http://www.thewired.tk/misc/china.txt
http://www.thewired.tk/misc/india.txt