I seem to have stuck in this weird issue. If I open my website by giving the address as http://example.com, it opens up fine. But if I enter the address as www.example.com or http://www.example.com, then the site opens as if the browser is JS disabled (and without any CSS formatting).
I tried in IE, Firefox and Chrome. The issue occurs consistently.
Is there really any difference between http://example.com and www.example.com?
If yes, then is there any way to give a consistent experience to the user irrespective of how he landed on the site? Maybe, by redirecting him to the http site even if he used just www.
Yes.
www.example.comis a subdomain ofexample.com. Typically they are the same site, but not necessarily. Some servers will only accept one or the other. Others (like mine) will redirectwww.domain.tldtodomain.tldfor easier cookie handling. Others still (very few) host completely different websites.