Updating settings.php breaks website hosted from subfolder This is somewhat linked to this question.  I have 2 Drupal 7 sites hosted in subfolders, one of which is intended to be a production site (public_html/site1) and the other is the testing site (public_html/site1-test).

The main url (i.e., site1.com) should be shown when accessing the production site.  When I go to my main url, it shows correctly.  However, all links and content are shown via the subfolder (e.g., site1.com/site1/content/... rather than site1/content).

To facilitate the change, I updated the $base_url variable in the settings.php file to serve the base URL (i.e., site1.com) and that completely breaks the site.  The theme stops showing, logins don't work, etc. 

Is there a way around this problem?  The main site should mask off the subfolder in the url, however I don't think I can do that without updating the $base_url
Try setting your base URL in settings.php like

$base_url = 'http://site1.com';  // NO trailing slash!


And in your .htaccess file set RewriteBase to:

RewriteBase /site1


or

RewriteBase /site1-test