Forum Moderators: phranque

Message Too Old, No Replies

Any ideas how to get this to work in htaccess please?

         

Dexie

5:50 pm on Jul 9, 2007 (gmt 0)

10+ Year Member



I have this in the htaccess to block certain countries, but it doesn't seem to work, any ideas please?

<limit GET>
deny from BR, RU, CN, RO, SN, SK
</limit>

Any help much appreciated.

Dexie

encyclo

6:31 pm on Jul 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check out the Apache mod_access documentation [httpd.apache.org] - the above code is meaningless. You have to block by IP address, usually from a country-to-IP database.

jdMorgan

4:23 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If HostnameLookups are enabled on your server, you *can* block by remote hostname, though:

Deny from spammers.co.uk
Deny from hacks.com

Jim