Is there any way I could block an ip or whole region to view my site. ?
I have been using this .htaccess method , but it doesnt work. I tried using my own ip.
Is there any other method?
Is there any way I could block an ip or whole region to view my site. ?
I have been using this .htaccess method , but it doesnt work. I tried using my own ip.
Is there any other method?
Have you tried this code ?
Clockwatchers - .htaccess Tutorial - Block An IP Address
If you have an Apache server, you can do this without scripting. Scripting will still allow them to poke around your site. Additionally you'd have to do it on all files, and change it every time a new one comes up.
This is a little complex, things can go wrong, so fully research before you drop in an .htaccess file with deny directives. Once you are familiar it, it as simple as creating a plain text file containing something like this, and naming it ".htaccess." "#" are comments and will not affect the functioning of the directives.
order allow,deny
<Limit GET POST>
allow from all
# specific ip address
deny from 123.123.123.123
# deny a range: 123.123.0.0 - 123.123.255.255
deny from 123.123.0.0/16
# the whole class: 123.0.0.0 - 123.255.255.255
deny from 123.0.0.0/8
# shorthand for previous
deny from 123
</Limit>
Of course, the person in the blocked country and use a web proxy and still get to your site. Still, it would cut down on the less savvy folks.
Related recent thread: http://www.webproworld.com/discussio...tml#post397714
Mini Network:: Financial information at your fingertips
Learn object oriented programming where it started
Conversations creates communities and conversions create profit.