How do I redirect visitors on cellphones and mobile devices ?

Discussion in 'HTML & Website Design' started by livingearth, Feb 4, 2010.

  1. #1
    I am trying to creat a mobile friendly version of my site. Hiow do I detect and redirect visitors to my website using cellphones and mobile devices to my phone friendly website version?
     
    livingearth, Feb 4, 2010 IP
  2. MrKushhy

    MrKushhy Peon

    Messages:
    67
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    create a mirror sub-domain called moblie.domain.com phones look for the [moblie] domain by default.
     
    MrKushhy, Feb 4, 2010 IP
    livingearth likes this.
  3. livingearth

    livingearth Well-Known Member

    Messages:
    1,469
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Thanks for your reply. I gave this a try but so far with no luck. Any more ideas?
     
    livingearth, Feb 4, 2010 IP
  4. seoget

    seoget Peon

    Messages:
    169
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi ,

    I think it should work.. try again.. you will get good result..
     
    seoget, Feb 15, 2010 IP
    livingearth likes this.
  5. kreativi

    kreativi Peon

    Messages:
    89
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You ca do this by modifying .htaccess file. Add following codes in it

    RewriteEngine on
    RewriteCond %{HTTP_USER_AGENT} "Windows CE" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "NetFront" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Palm OS" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Blazer" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Elaine" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "^WAP.*$" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Plucker" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "vodafone" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "iPhone" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "nokia" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "symbian" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Opera Mini" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "BlackBerry" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "j2me" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "midp" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "htc" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "java" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "sony" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "android" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "AvantGo" [NC]
    RewriteRule (.*) http://m.mysite.com [R,L]
     
    kreativi, Feb 15, 2010 IP
    livingearth likes this.
  6. livingearth

    livingearth Well-Known Member

    Messages:
    1,469
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    140
    #6
    Hey thanks guys for all the help, I'm still working on it, but the nput has been beneficial. Pos rep for all!
     
    livingearth, Feb 15, 2010 IP