Example of a .htaccess file for Window's Apache 2.4 Webserver
Posted: Fri Mar 20, 2015 3:47 pm
Here's an example of a my .htaccess file that allows all web traffic with the exception of certain ip addresses.
I ban by country IP's in these .htaccess files and i get them from
http://www.ip2location.com/blockvisitorsbycountry.aspx
Hope this helps!
Code: Select all
order allow,deny
deny from 1.6.0.0/15
deny from 1.22.0.0/15
deny from 1.38.0.0/15
deny from 1.186.0.0/15
deny from 5.56.18.0/24
deny from 5.56.20.0/24
deny from 5.56.21.128/25
deny from 5.56.23.0/25
deny from 5.104.224.15/32
deny from 5.104.224.141/32
deny from 5.104.224.142/31
allow from all
http://www.ip2location.com/blockvisitorsbycountry.aspx
Hope this helps!