Forum Moderators: phranque

Message Too Old, No Replies

Geoip Htaccess Problem

Excluding a folder

         

DustyDuke

5:30 pm on Jul 6, 2012 (gmt 0)

10+ Year Member



I have an htaccess problem that is hurting my brain. My site structure is:

ROOT
Folder A
Folder B
Folder C
Folder D

I am using geoip to redirect certain countries that visit my site to another version of it in FOLDER D, that works fine however I need those countries to also access FOLDER C from FOLDER D My htaccess currently is:

GeoIPEnable On

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^US$
RewriteRule ^(.*)$ http://www.example.com/folderd/index.html [L]

The problem of course is that when they try to visit Folder C they get sent back to Folder D. How can I exclude Folder C from being affected by htaccess geoip in the root ?

Thanks

[edited by: incrediBILL at 7:46 am (utc) on Jul 7, 2012]
[edit reason] fixed URLS, use Example.com [/edit]

g1smd

5:34 pm on Jul 6, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Change the (.*) pattern which means "everthing" to be more specific OR add another RewriteCond detailing any exclusions.

DustyDuke

5:38 pm on Jul 6, 2012 (gmt 0)

10+ Year Member



Thanks but how would the code look ?