GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Help needed with htaccess mobile redirect & multiple country redirect (https://gfy.com/showthread.php?t=1086479)

antini 10-23-2012 09:33 AM

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]

But, is it possible to include 2. as well in this code? If yes, any suggestions?
Thanks in advance!

over38 10-23-2012 11:48 AM

Bump For You

antini 10-23-2012 04:15 PM

Any suggestions?


All times are GMT -7. The time now is 11:38 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc