New Zenner
- Join Date:
- Jan 2011
- Posts:
- 4
- Plugin Contributions:
- 0
block ip country
How to block viewer ( country ) by .Htaccess ?
please step by step:laugh:
New Zenner
How to block viewer ( country ) by .Htaccess ?
please step by step:laugh:
New Zenner
peapea:
How to block viewer ( country ) by .Htaccess ?
please step by step:laugh:
I don't known about it.
Nojja567
Katha
Black Belt
Yu will need to determine the countrys range of ip's or CIDR
The following site will generate a CIDR deny list for you to paste into your htaccess file
Just select IP ranges by Ip Country Location and output as CIDR
Zen-Venom Get Bitten
New Zenner
Can someone tell me which folder does the .htaccess file belong in? I have found the list to block IP's online, I placed it in my .htaccess file but I noticed that several folders have an .htaccess file so which one should have this information to ban certain visitors? Currently I have placed the code in every .htaccess file I found and added my own IP and of course I can still see my site.
This is the file I added to my .htaccess file:
<Files *>
order allow,deny
deny from 127.0.0.1 (I changed this to my IP address)
allow from all
</Files>
Is this correct?
Thanks in advance for your help.
Vee
Add Info: When I add the code to all the .htaccess files I have found, when I try to log into my Zencart admin, I get an error page that my hosting providers says is a corrupt .htaccess file.
Sensei
Zen Cart comes with .htaccess files located INSIDE SUBDIRECTORIES ONLY. YOU DO NOT EDIT THESE FILES.
Zen Cart specifically comes with NO .htaccess file in the root of your store, because Zen Cart doesn't need one there in order to run.
So:
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
New Zenner
Thank you very much that did it.
Vee
New Zenner
veedub3:
Thank you very much that did it.
Vee
After talking to my server tech support they informed me that blocking ip addresses through the .htaccess or ip deny in my control panel will eventually effect the visitors that I want to show up and access my site because the the IP addresses are always changing globally. users IP in china, ukraine or russia may become an ip address for some user in the us therefore blocking potential customers in the us... check with your server and verify my findings.
Sensei
firedealer:
... because the the IP addresses are always changing globally. users IP in china, ukraine or russia may become an ip address for some user in the US therefore blocking potential customers in the US...
IMO that's a bit of a stretch. While it's technically possible, it's relatively rare that IPs change to represent different country locations.
Nevertheless, it is wise to regularly review any IP addresses you've blocked to be sure you still need/want to block them.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Tell staff why this post should be reviewed.