My story is:
I use module Domain Access for Multi domain feature and Internationalization, Domain Variable for the multilingual features. I have these domains:
- www.domain-a.com (main domain)
- www.domain-b.com
- www.domain-c.com
All is set to use www. prefix.
Now I have www.domain-d.com.au replacing www.domain-c.com. So I delete www.domain-c.com from Domain list in Drupal and add www.domain-d.com.au.
I also set redirect. So when user visit www.domain-c.com or domain-c.com, they'll redirected to www.domain-d.com.au. I add a rule in .htaccess:
RewriteCond %{HTTP_HOST} ^www.domain-c.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^domain-c.com$ [NC]
RewriteRule ^(.*)$ http://www.domain-d.com.au/$1 [L,R=301,NC]
Result is:
- Visit www.domain-d.com.au. Page opened OK.
- Visit domain-d.com.au, redirected to www.domain-d.com.au
- Visit www.domain-c.com, redirected to www.domain-d.com.au
- Visit domain-c.com, not redirected (fail).
Question is:
How to make domain-c.com to redirect to www.domain-d.com.au? Is here something wrong with my .htaccess.
I uncomment the with www.
prefix in Drupal .htaccess and add the rule right below the
...
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
...