I wish to develop the mobile (includes apple iphone,ipad,andriod) version of my original site. But I'd rather not create another sub domain like world wide web.m.mydomain.com, can one dynamically alter the document root individually for mobile version and also the existing one? I've also observed that, after i open facebook form apple iphone or any andriod mobile it opens with it's original domain title like http://world wide web.facebook.com/ bt after i open it up from the other mobile like nokia or samsung it arrives with http://m.facebook.com/, what's the distinction between this 2?
If this involves apple iphone and Android deveices, an internet site needs hardly any changes as their web browsering abilities work great.
For other products in which the web browsing consumer experience is less satisfying, the website would dynamically switch these to another and fewer "intense" version from the website.
The dynamic switching of browsers is performed via code. You will find methods for discovering what browser just asked for your site. In line with the information came back after that you can redirect to specific scripts that will handle the consumer demands there after.
For example, this can be used standard argument to determine the browsers going to your website:
Hope that assisted.
You are able to differentiate it by
User-Agent property either on Apache level, or PHP level. Though that won't be guaranteed because UA could be spoofed. (But the number of mobile customers would do UA spoofing to pretend they are not mobile?)
You need to do want an special URL for the mobile website - as you would like your mobile web site to properly come in the mobile search of search engines like google.
world wide web is really additionally a subdomain, but it's so frequently used, people don't usually understand it, Usually most browsers add it automatically and for this reason most servers get it enabled automatically.
The situation you stated can also be of subdomains. The server look at your HTTP request's user-agent and redirects you to definitely the mobile subdomain properly.
This is not a real quick solution for you personally, however i recommend reading through Ethan Marcotte's Responsive Website Design articles on alistapart.org. He covers the philosophy along with the practical making a website work nicely for various contexts - desktop browser to mobile device, etc. You will find several articles on the website (just look for responsive website design you will get a number of his articles inside your results.)
you may apply certain solution:
produce a specific mobile website and use it folder/subdomain and redirect any user with mobile to that particular site, example: mydomain.com/m/ or m.mydomain.com
you could utilize responsive webdesign technique, some framework already readily available for this
http://world wide web.columnal.com/