I want to have identical websites running on immo-egypte.be and immo-egypte.nl, which both use the files from immo-egypte.com. This topic is not about the dangers of duplicate content, I'll fix that later. Some methods I've tried:
1. Using .htaccess to rewrite the URLs behind the scenes:
RewriteCond %{HTTP_HOST} ^(www\.)?immo-?egypte\.(be|nl) [NC]
RewriteRule ^(.*)$ http://www.immo-egypte.com/$1 [L,R=307]
This resulted in a 500 Internal Server Error
2. Using the Virtual Sites Module to set-up a condition which checks on hostname immo-egypte.be in order to load a virtual site. I might not have done this correctly since the Drupal Installation Wizard was loading when visiting the domain.
Which method would be preferable and how could I make them work correctly? I hope someone can help me with this.
Comments
Are the domains on the same
Are the domains on the same hosted account, using different directories? Or are they on different accounts?
Do you want immo-egypte.be and nl to retain their domain names while browsing the site, or just to take you to the com site.
They're all pointer (aka
They're all pointer (aka parked?) domains. I want immo-egypte.be and immo-egypte.nl to retain their domain names, correct. But the images are on the .com domain (sites/immo-egype.com/files/...)
AFAIK all you really have to
AFAIK all you really have to do then is 'Park" the additional domain names on the original and point them to the same directory as the original. This would effectively let the site be accessed by all 3 domains and serve identical content for all 3.
If you make them either DNS
If you make them either DNS Alias Records (cname) of the main domain, or if you just point them to the same document root directory you won't need any apache rewrites or redirects.
I am not sure what parked domain or domain pointer means, because the hosts that I have dealt with seemed to mean different things.
They use the same root
They use the same root directory, but Drupal will identify them as other domains and show the installation page. For the main domain, I had to make a folder in sites/immo-egypte.com. How do I handle this?
The other sites are looking
The other sites are looking at sites/default for their settings, because there are no subdirectories with their names.
One way is to take the settings.php file from inside sites/immo-egypte.com and move it to sites/default. Remove (or rename) the immo-egypte.com directory, so that it can't be found.
Then all your sites will get their settings from the same sites/default/settings.php file.
Or, alternatively: create sites/ subdirectories for the other sites and put copies of the same settings.php file in them, so that they can find it and use the same database settings.
I tried that before, but
I tried that before, but then the paths for most of the images are being searched under the wrong folder. If a visitor goes to immo-egypte.be for example, it will reference images at sites/immo-egypte.be/files, although they're actually located at sites/immo-egypte.COM/files
If you already have images,
If you already have images, go to the other sites, to the admin/settings/file-system page, and change their file paths to point to the same directory, sites/immo-egypte.com/files. All of them.
If all the sites are new and you don't have images yet, then don't create separate sites/* subdirectories for any site and let them all use sites/default and sites/default/files.
Have you found a solution? Myself I am using multisites for this
I set up drupal 6.6 with multi-sites try this configuration set up, it still stands from 4.7 to now, and Domain Access That should do the trick. Just set it up and you will see that you can do things the way you would like to.