Hi All,
I would love to hear some thoughts or experiences anyone might have had with restricting website access by IP in another country e.g. If you have your website hosted in the UK, how can you prevent or redirect someone from another country who visits your .co.uk who is not in the country. I am thinking of using a piece of software by analysespider.com called " Target Country by IP Address Download". Can anyone recommend the best way to approach this? Are these packages worth the weight, is there a highly recommend open source one dedicated to PHP etc
IP / Country Restriction Scripts
Not sure if it's the best way, but you could use .htaccess to restrict IP ranges belonging to certain countries:
ex.
<Limit GET HEAD POST>
order allow,deny
deny from 203.31.234.0/24
deny from 51.0.0.0/8
deny from 199.103.64.0/22
deny from 199.103.82.0/23
deny from 199.103.86.0/24
deny from 199.103.114.0/23
deny from 199.103.116.0/23
deny from 199.185.139.0/24
etc..
allow from all
</LIMIT>
Thanks anakadote, really unsure as to the best practice for this. The .htaccess is def the quick, dirty and cheap route for sure. Hopefully some more feedback from others soon on the best practice and advice