I was tearing my hair out trying to figure out why requests to my main site were getting remapped to my alternate site. This happened after enabling the Gallery module in the alternate site. It appears that module stomped all over my htaccess file:
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
RewriteEngine On
RewriteBase /baja/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_FILENAME} !/baja/index\.php$
RewriteRule . - [L]
RewriteCond %{THE_REQUEST} \ /baja/d/([0-9]+)-([0-9]+)/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/baja/index\.php$
RewriteRule . /gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g$
RewriteCond %{THE_REQUEST} \ /baja/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/baja/index\.php$
RewriteRule . /baja/index.php?q=gallery&g2_view=core.ShowItem&g2_path=%1 $
That would explain the problems. So modules are allowed to edit major config files?! Without any indication of which lines go with which modules? Who made the changes? When? Yikes!