I would like to use Drupal 7 to support two domains with same code, themes, modules and even database and content, completely transparent to the end-user.
So, user of exmaple1.com would see only exmaple1.com and user of example2.com would see only example2.com (not be redirected to example1.com). To complicate matters, I already have example1.com legacy, which cannot change.
Closest I have come -
1) using apache virtual host to proxy requests for both domains to same drupal htdcos directory.
2) setup sites for each domain as per https://drupal.org/node/53705.
a) Modify the base URL within settings.php file under example2.com directory
But, still, users of example2.com are redirected to example1.com(?!). In fact, I looked into my default settings.php file and found the baseURL field is commented out. A directory search for my sites base URL returned no results, suggesting it is set somewhere in the database? WHERE? I looked into tables like url_alias - no records. Can this is set to some variable that reads the HTTP request for the base URL and not be hard-coded as it seems to be?
I have already reviewed solutions that "fix" the base_URL in settings.php, apache virtual host, doing HTTP redirect/rewrite in .htaccess, pathauto modules, backup/migrate and also multi-site.