I'm trying to have one domain parked on another as in domainA = domainB and vice versa. This is not possible with a drupal multi-site setup because they all direct to public_html. Is it possible to do an addon domain for one domain which will then created it's own directory. Can that still work in combination with a multi-site installation ?

Comments

cog.rusty’s picture

In a Drupal multisite all domains or subdomain must point to the same index.php and not in different directories. So that is not a problem, it is convenient.

What may be a problem is what "parked domain" means. This is just a word that hosts use, and may mean different things. If a parked domain is a DNS CNAME or an apache ServerAlias, then it is fine. If it is some kind of framing, it is not.

To test it create a checkhost.php script:

print $_SERVER['HTTP_HOST'];

Upload it and run it from either domain:
http://domainA.com/checkhost.php
http://domainB.com/checkhost.php

If these print the two different domains, then it is probably OK for a multisite.
If they both print the same domain, then it is not OK for a multisite.

espirates’s picture

The thing is, I want a .net domain to be parked on a .com domain listed in the multi-site but everything gets parked at public_html which means all parked domains unless defined by the multi-site will assume the default domain only.

my example

sites/domainA.com would like domainA.net to be parked here
sites/domainB.com and domainB.net parked here

It doesn't seem like it's possible with a mutli-site setup.

I did the checkhost.php and it does display each unqiue domain.

I can redirect a domain to another domain but that's not the same as parking it at the same domain.

cog.rusty’s picture

In a Drupal multisite, all domains must point to the same place, Drupal's index.php (not to sites/etc). This is necessary for Drupal to start.

Then Drupal examines the HTTP_HOST of the request, compares it with the names of the directories under sites/, and serves the right site.

So, it is a good thing for a Drupal multisite that all domains point to the same place.