0

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.

Net Dawg
  • 518
  • 1
  • 6
  • 10

2 Answers2

0

It seems that you read an old documentation for multisites on (2). For Drupal 7 check https://drupal.org/documentation/install/multi-site.

But you need to set up Symlinks (Symbolic links) to achieve that. I don't think you need a multisite here if both sites use the same files and database.

TheodorosPloumis
  • 2,396
  • 1
  • 17
  • 31
  • Correct. Multi-site is not applicable for using same files and database. There is another Drupal module, Domain Access, that handles this issue. But I have been unable to get it to work, unfortunately, so I did not answer my own question. It messes up the legacy site (styles are lost). Removing the module restores the site. – Net Dawg Aug 16 '13 at 03:21
0

Try the useful link below for Drupal 7 multisite install,

http://mydons.com/drupal-7-multisite-install-steps-in-windows/

http://mydons.com/drupal-7-multisite-install-steps-in-linux/

Shankar Ganesh Jayaraman
  • 1,401
  • 1
  • 16
  • 22