![]() |
![]() |
![]() |
||||
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: Jun 2003
Posts: 633
|
Help needed with htaccess mobile redirect & multiple country redirect
What I would like to achieve thru .htaccess (would like to avoid php or javascript) is the following:
1. Send mobile surfers from some German speaking countries to e.g. http://www.mysite.com/mobile1/ 2. Then, send all other mobile surfer (i.e. rest of the world) to e.g. http://www.mysite.com/mobile2/ 3. And finally, of course send all non-mobile surfers to my regular site http://www.mysite.com/ Btw, I also have mod_geoip installed on my server. The code down here should take care of take care of points 1. and 3.: Code:
RewriteEngine on 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] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AT$ [NC,OR] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CH$ [NC,OR] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^DE$ [NC] RewriteRule ^[^/]*$ http://www.mysite.com/mobile1/ [R=302,L] Thanks in advance! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Aug 2002
Location: USA
Posts: 460
|
Bump For You
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jun 2003
Posts: 633
|
Any suggestions?
|
![]() |
![]() ![]() ![]() ![]() ![]() |