We have a multilingual Drupal installation with a domain for each language. Like this:
- domainexample.com
- domainexample.no
- domainexample.de
- etc…
We want to switch to a single domain and use domain prefix instead:
- domainexample.com/en
- domainexample.com/no
- domainexample.com/de
- etc…
Settings this up through Drupal administration is no hassle – the problem is that the old domains should redirect to the new one. My guess is that this should be possible with some sneaky htaccess. I’m no expert here however. I currently have:
RewriteCond %{HTTP_HOST} ^domainexample.de$ [OR] RewriteCond %{HTTP_HOST} ^www.domainexample.de$ RewriteRule (.*)$ http://domainexample.com/de/$1 [R=301,L]
…which works for the frontpage – but not for the subpages. They get redirected to this 404 page: domainexample.com/de/index.php.
How can this be solved?
/Morten