Hi I'm using .htaccess to block some sites by country My question is how to block all my country without my ip My ip is 91.90.115.99 My htaaccess looks like: ........... deny from 90.156.0.0/17 deny from 91.90.56.0/21 deny from 91.90.72.0/21 deny from 91.90.88.0/21 deny from 91.90.112.0/21 deny from 91.90.160.0/20 deny from 91.90.176.0/20 allow from 91.90.115.99 allow from all ............................. But its not working CAn Anyone help me with that?
Try this: order deny,allow allow from 12.34.5.67 allow from 98.76.54.32 deny from all You can specify as many different allow from lines as you require. Or you can even allow entire IP subnet's by specifying just the first part of an IP, for example: "12.34.". This is called Htaccess IP Restriction.
so how this should look like? deny from 90.156.0.0/17 deny from 91.90.56.0/21 deny from 91.90.72.0/21 deny from 91.90.88.0/21 deny from 91.90.112.0/21 deny from 91.90.160.0/20 deny from 91.90.176.0/20 allow from 91.90.115.99 allow from all It looks like deny include my ip 91.90.115.99
yes but now this block all users around the world but i want just block my country So can i make this order deny,allow allow from 91.90.115.99 deny from 90.156.0.0/17 deny from 91.90.56.0/21 deny from 91.90.72.0/21 deny from 91.90.88.0/21 deny from 91.90.112.0/21 deny from 91.90.160.0/20 deny from 91.90.176.0/20
Then you need to play with .htacess with the help of these sites: http://www.countryipblocks.net/ http://ipinfodb.com/ip_country_block_htaccess.php Code (markup):