Help needed with htaccess mobile redirect & multiple country redirect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • antini
    Confirmed User
    • Jun 2003
    • 633

    #1

    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!
    ADULT SPONSOR DB - With Advanced Search Function

    Email: kvnmedia [AT] gmail.com
  • over38
    Confirmed User
    • Aug 2002
    • 460

    #2
    Bump For You
    Mainstream Blazing Fast SSD WordPress Hosting
    As Low As $4.97/month! USA Based Support !

    Comment

    • antini
      Confirmed User
      • Jun 2003
      • 633

      #3
      Any suggestions?
      ADULT SPONSOR DB - With Advanced Search Function

      Email: kvnmedia [AT] gmail.com

      Comment

      Working...