I have a single Drupal 7 install running in 2 languages, on 2 domains, but currently using a language prefix as selection. Content can be access as follows:
English
mysite.com/content/wonderful
mysite.de/content/wonderfulGerman
mysite.com/de/content/wunderbar
mysite.de/de/content/wunderbar
I will change to domain language selection, so that one language is accessible on each domain:
English
mysite.com/content/wonderful
German
mysite.de/content/wunderbar
The setup works wonderfully on my dev server, but all the old links with the /de/ language prefix will be broken.
Is there a way to 301 them all with one fell stroke? Or how can I detect and strip the prefix in /de/content and at the same time redirect to .de/content? Is this best accomplished in .htaccess?
For German content, the appropriate redirect pattern would be as follows:
mysite.com/de/content/wunderbar -> mysite.de/content/wunderbar mysite.de/de/content/wunderbar -> mysite.de/content/wunderbar
Since English has no language prefix, how can I subsequently detect English content that is trying to be accessed on the .de domain and redirect accordingly?