Forum Moderators: phranque

Message Too Old, No Replies

Will ~3000 order/deny rules in .htaccess slow down a webserver

         

smithaa02

8:00 pm on Dec 1, 2011 (gmt 0)

10+ Year Member



Looking to block China and Russia from the my sites and found a cool website that allows you to select the countries you want to block and it spits out the .htaccess file you need:

[ip2location.com...]

Problem is that I'm getting 3000 lines for just China and Russia...I can certainly paste this in, but will I be slowing things down?

g1smd

8:07 pm on Dec 1, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




The code can certainly be optimised in many ways.

It will not need to be anything like that long.

robzilla

8:38 pm on Dec 1, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It will, so make sure it's worth it. If computers in these countries are abusing scripts on your site, consider blocking their access to those scripts specifically (and not necessarily via .htaccess or httpd.conf, or even IP-based) rather than site-wide.