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.

For the m.domain.com feature, case a subdomain from the domain.com website. Clearly, it signifies a mobile version from the primary site and can strip out such things as expensive and javascript essentially anything which is an excessive amount of for any fundamental mobile browser.

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?)

The main difference is the fact that top end mobile products like apple iphone/android have sufficient support and functionality to aid the initial version from the website (zooming/javascript etc). Other products are better offered an fundamental website produced for mobile products having a limited display and/or support.

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

example on redirection:


you could utilize responsive webdesign technique, some framework already readily available for this
http://world wide web.columnal.com/
http://stuffandnonsense.co.united kingdom/projects/320andup/