I am trying to redirect all others countries than sweden and Thailand # Redirect Redirect 301 / www.hello.com # RewriteEngine on RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(TH|SE)$ RewriteRule ^(.*)$ http://www.google.com$1 [L] PHP:
Have you installed the GeoIP library properly? If I were in your position, I'd do programmatically with PHP. I've put the sample code below. http://pastebin.com/iCVM1cAD
Make sure that you have the Apache module setup correct: echo '<pre>'; print_r($_SERVER); Code (markup): You should be able to see all the GEOIP variables, if not it is not setup correctly if it is make sure the variable name matches. If all is good, how are you testing it (via proxy?) access the above print_r test page while on the proxy to make sure it is picking the country right.