Lawrence Posted January 25, 2010 Share Posted January 25, 2010 Hi guys, I am looking to redirect cart.php to another page on my site if the request comes from a certain country. I've got it partially figured out (using GeoIP and Maxmind). But cannot get the .htaccess rules quite right to handle it So far, I got this: # Redirect Vietnam country to rejected page GeoIPEnable On RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^VN$ I need the RewriteCond to check if the page being requested is cart.php and the Rewrite rule to redirect to another page on the main folder of our site (example: /banned.php ) Hope someone can help! 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted January 25, 2010 Author Share Posted January 25, 2010 Here is the rule exactly as tried: # Redirect Vietnam country to rejected page GeoIPEnable On RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^VN$ RewriteCond %{REQUEST_URI} ^cart.php [NC] RewriteRule ^(.*)$ http://www.lcwsoft.com/page.php [L] 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.