Mobile app version of vmapp.org
Login or Join
Murphy175

: Is the m subdomain automatically supported / redirected by mobile devices, if not how should I redirect? I'm trying to set up a mobile version of a site, and I'm wondering if I can just set

@Murphy175

Posted in: #Android #Iphone #Mobile

I'm trying to set up a mobile version of a site, and I'm wondering if I can just set up a m subdomain and put the mobile site in there, or if I need to set up some kind of redirect to make phones automatically go to it.

Could you point me in the right direction for getting started on this? I'm having trouble finding good info.

Thanks

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

3 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale272

detectmobilebrowser.com redirection is based solely on the UserAgent string which can easily be modified using an add-on on Firefox, or any other method. Also, some mobile operator will change the UA string so it can make UA redirect more unstable. You can find many services working like this one.

wurlf is using some feature detection in addition to the UserAgent. Additionally, you can get some useful info about the device like screen size. This will help you render a version of your website that is best for your visitor.

So if you want to stick with free device recognition, I'd go with wurlf.

10% popularity Vote Up Vote Down


 

@Mendez628

You will definitely have to build your own redirect. It really depends on you language as to how to do it.

Also, this was asked on SO a while back, here. Check out WURLF as the SO answer suggests.

When you make the redirect you will want to make sure to use a 302 Redirect.

10% popularity Vote Up Vote Down


 

@Sarah324

Unless I missed something I do not believe this is automatic. These sites have made a special mobile versions of their site and are redirecting them there automatically through code on their servers.

If you know PHP there is a handy PHP code generator that will create the code for depending on your exact needs. This site seems to offer many more languages. I bet if you looked hard enough you could find a set of Apache rules to do this, too. It looks like the gist of i is to search the user agent and look for signs of the mobile phone manufacturer. So the key is to make sure this list is kept up to date.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme