: 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
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
More posts by @Murphy175
3 Comments
Sorted by latest first Latest Oldest Best
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.
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.
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.