Why does the formatting disappear after enabling SEF URLs?
From Joomla! Documentation
Redirect page
Depending on the PHP version you are using (for example, version 5.2.6), the configuration.php file might need to be changed as follows:
var $live_site = 'http://www.yoursite.com';