![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jan 2002
Location: Ny
Posts: 4,109
|
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
__________________
Hey surfers how about some The Best Porn Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,036
|
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |