It is so bizarre that I don't even know how to put it. I just try my best to describe the issue here.

I have two domain names that used to be running on a web server (LAMP) with a different CMS. Say example.com and example.net (mod rewrite to example.com)

My new multi-site Drupal solution (with custom theme) works fine on local machine and test to work fine on the same web server with some temp URLs.

Now point example.com and example.net to the Drupal's root directory, the site will come up fine for the very first few hits and then crap out. Safari reports kCFErrorDomainCFNetwork:302 while Firefox just says "Connection to the server was reset while the page was loading.".

During the course of debugging, I found a fix that by simply placing an echo statement of one blank character just right before the print theme('page', $return); statement in Drupal's index.php and both domains will come up just fine.

I did some experiments and noticed that:
if I just point example.net to the new Drupal, it works.
But if I just point example.com to the new Drupal, it will experience the same issue.

I have cleared the Drupal's cache without any luck.

So the question is: why would the two domains work if I force to output one single blank characters in the index.php. Apache is not setup to use caching so Drupal shouldn't be interfenced with old cache data from example.com.

So weird.

Comments

flavor’s picture

whey are you using mod rewrite for your 2 domains and not a Virtual hosting setup with separate entries (http://tinyurl.com/onchr) in your httpd.conf file for each site? Possibly you are but I did not see that in your post so I would start on the configuration of the Apache setup.