Zen Cart Logo
Forums / General Questions / Restrict Country IP's from Certain Category

Restrict Country IP's from Certain Category

Locked

Views: 1,048

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
11 Jan 2010, 9:56 AM
#1
ruthless avatar

ruthless

New Zenner

Join Date:
Jun 2008
Posts:
13
Plugin Contributions:
0

Restrict Country IP's from Certain Category

v1.3.7
Can anyone assist in this issue please...
We need to setup a product category that the entire world can see EXCEPT the UK. I know .htaccess can be modified to exclude the IP addresses from any country, but that stops them browsing the entire site. A product category does not create a folder, so .htaccess cannot be placed there.

What I think we need is a .htaccess that excludes the UK IP range from the category URL, i.e. http://www.surveyequipment.com/used-surveying-equipment

Any suggestions welcome, thanks.

13 Jan 2010, 1:35 PM
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,290
Plugin Contributions:
39

Re: Restrict Country IP's from Certain Category

Something like this

RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^123\.255\.123\.255 [OR]
RewriteCond %{REMOTE_ADDR} ^124\.255\.124\.255 [OR]
RewriteCond %{REMOTE_ADDR} ^125\.255\.125\.255
RewriteRule ^(.*)$ http://www.surveyequipment.com/

This will redirect by Ip to your main page.

~Melanie