![]() |
Need help with htaccess mobile and country redirect
Ok this is what I use to redirect mobile traffic
#redirect mobile browsers RewriteCond %{HTTP_USER_AGENT} ^.*iphone|ipod|ipad|blackberry|android|sgh|sonyeri csson|psp|mot|htc|lg|nokia|palm|treo|j2me|webos|sm artphone|symbian.*$ [NC] RewriteRule ^(.*)$ RewriteRule .* http://domain/mobile/ [R=302,L] Now how do I keep my US/Canada traffic to going to http://domain.com/mobile and have the following countries go to http://domain.com/mobile2 Germany France Sweden etc I'm not having much luck messing around with php I rather do this in htaccess Thanks |
Easiest way for you would be to use the free maxmind country database: http://www.maxmind.com/app/geolitecountry
Ask your host to install mod_geoip, and then you can add the geoip stuff to your htaccess files alongside the mobile redirection. http://www.maxmind.com/app/mod_geoip |
All times are GMT -7. The time now is 04:27 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123