After publishing from localhost site to server, site is not loading right

Permalink
I've been searching for a few hours on this topic of moving between hostnames/domain names. I am moving from a local instance of concrete5 installed tohttp://localhost:24993 to a server in my office with a URL ofhttp://servername.

There are not any entries in my site.php for BASE_URL or DIR_REL. The site loads perfectly locally but after publishing my files and DB to my host server, the home page loads with the header image way over to the right and the font looks different. I can still login and the site is functional, but it clearly is not loading something right.

If I go directly to the server and browse tohttp://localhost on it, the site loads beautifully. If I load it ashttp://servername, it shows the strange formatting.

I've tried:
Adding BASE_URL and DIR_REL to my site.php
define('BASE_URL', 'http://servernamehere');
define('DIR_REL', '');
Clearing the cache

All the guides say that I need to update BASE_URL and DIR_REL but that doesn't seem to be working.

Thanks in advance for any help!

 
jero replied on at Permalink Best Answer Reply
jero
When moving a site, you may need to change
BASE_URL and/or DIR_REL - which you say you've done correctly.

You also may need to adjust the .htaccess file in the document root if that's present. The best method is to delete it and use C5 to generate it again (check the pretty url setting in the dashboard)

Are you by any change using Internet Explorer? You might find that it's treating one site as an Intranet site and one site as a real Internet site. The difference is the Document Mode it uses. Check by pressing F12 and seeing which Browser Mode and Document Mode it's picked for both.
concretefaith replied on at Permalink Reply
Wow, awesome answer, thank you! I'm running on Windows so I didn't think the .htaccess was the problem but it turns out IE was treating the URLs differently.

Really appreciate the quick and extremely helpful response!
jero replied on at Permalink Reply
jero
You're welcome. Glad you got it sorted :)