View Full Version : .htaccess question
RichieBoy67
01-11-2011, 12:38 AM
Hey all,
I have been working on blocking countries using htaccess when a thought occurred to me for once. lol Instead of blocking a ton of countries why now just allow the countries I want and block everything else..
Before I spend the time figuring out IP ranges etc I figured I would ask here and see if anyone already has written an htaccess like this? The site I am working on just wants English speaking countries..mainly US,UK and Canada..the rest can be blocked.. Can anyone help me with this??
Thanks much,
Richie
TheLastSuperman
01-11-2011, 12:59 AM
I can post some links and warn you that very large .htaccess files can cause issues just not good to have imo.
http://www.webdeveloper.com/forum/showthread.php?t=133633
http://www.wizcrafts.net/nigerian-blocklist.html
Basically your looking at some editing on the htaccess end and I've honestly never thought to do anything this extreme as for me anyone visiting could be a potential client etc so I can't speak from experience perhaps leave time for someone else to chime in and possibly help with this or use those links and Google to find something you can use ;).
RichieBoy67
01-11-2011, 01:34 AM
I agree but this is for a client..
Thank you for the links. I have already written a few different htaccess files but I have been trying to range the IPs to make it shorter..
I figure allowing US,Canada and UK would be a much smaller Htaccess than if I banned all the other countries and just allowed us etc.. The problem is I cannot find ranges..
Thanks again..
Update--Those links were very helpful and I believe the data I need is in the first link..Thanks for your help Superman.. Its a bird, a plane... no...its a web developer..lol
TheLastSuperman
01-11-2011, 02:05 AM
LOL well your right, allowing some yet blocking the rest is a better route from what I read but remember, it's your job in a sense to make sure your client knows all the risks kwim? ;).
RichieBoy67
01-11-2011, 02:11 AM
Yes, so true..I have decided to just block the most problematic countries and then just ban any other countries that cause problems.. Apparently this site has been a target for years.. It has not been successfully attacked though since my improvements weeks ago so perhaps all of this is overkill..
Thanks again for your help..
Rich
TheLastSuperman
01-11-2011, 02:27 AM
No problem, glad the links were helpful ;)
TheLastSuperman
01-13-2011, 07:22 PM
Ohhh Richie...
Look what was released on Jan. 11th, we missed it by one day and I just now came across it ;).
https://vborg.vbsupport.ru/showthread.php?p=2148617
Also take a look at post #14 ;).
RichieBoy67
01-13-2011, 09:51 PM
Awesome...
Thanks!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.