Search code examples
internet-explorerurlfirefoxbrowserpathname

Wrong URL pathname in the browser addressbar


I have a website say: www.mywebsite.com When I navigate to different pages, the url in the browser addressbar does not change. For instance, when i go to http://www.mywebsite.com/page1, the page1 loads fine with all the content, but the addressbar is showing http://www.mywebsite.com

Even worse, the window.location.pathname matches the addressbar, not the actual page that is being shown.

  • This problem exists on IE, Chrome, and Firefox on Windows, and Firefox on OSX.
  • Chrome and Safari in OSX work fine.
  • The problem exists only on my production server (www.mywebsite.com). I have the exact same code on my stage server (stage.mywebsite.com) and it runs fine in all browsers without any problem.

This is very confusing. I spent an hour searching on google for a reason, with no success. Any help is appreciated!


Solution

  • Godaddy's fault...If you happen to have the same problem, reset your naked domain to www forwarding setting in your domain settings!