Not sure if this is your fix, but for me it was my hosting settings. I use directnic, and I'd set the redirection to :
Redirect with No Frame
Any traffic going to your domain will be redirected to a URL of your choice, such as your pre-existing web site on another server. Traffic will be redirected directly to your site, by using a HTTP 302 redirect. The destination URL will be displayed in the "Location" field of the browser
when it should have been:
Redirected
Any traffic going to your domain will be redirected to a URL of your choice, such as your pre-existing web site on another server. This will be done by including your website within a HTML frame. Your directNIC domain name will remain in the "Location" field of the browser.
Problem sorted for me, and infact removing the localhost stopped me from access the site as localhost.....