This is a contributed module that sends a permanent redirect if someone tries to access a page that is not available on the current domain. For it to work you need to clear the page cache after enabling it.
You can define a domain-setting in wich order domains should be selected when the node can be redirected to more then one domain. By default if the node is requested in one of the defined affiliates it will not be redirected. This module also can respect the settings of module domain source.
When configured the module can create a canonical link in the header. This is usefull when you have one or more pages accessible from more then one domain. For more information about canonical links see: googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html.
You have to create a domain selection table with the selection order of domains.
There is one api function to create a canonical link for a given path and base domain. This api will respect all configuration settings. This is created to be able to set canonical links for system or custom paths like contact.
domain_redirect_create_canonical_link($path, $domain_id = -1, $query = NULL)
$path / $query: path and query to create a link for
$domain-id: the base domain_id to link to. If it is not the current domain a canonical link will be created.
We have requested a CVS account, so we hope to publish this module in the near future on drupal.org.
We have the Drupal 5 version of domain-redirect running in five sites now and more to come in Drupal 6. Up till today we didn’t test the D6 version ourselves.
Please inform us when you have any problem. You can drop a comment after loggin in.
Download Drupal 5 version.
Download Drupal 6 version.
You can test the redirects. Test1 will redirect to domain1.drupalhandboek.nl. Test2 will redirect to domain2.drupalhandboek.nl. No canonical links are created: these pages are only available in the given affiliates.
This page is available in domain1.drupalhandboek.nl and domain2.drupalhandboek.nl. The domain1.drupalhandboek.nl page has no canonical link, domain2.drupalhandboek.nl does have the link.


