I have a wordpress installation which was installed in subdirectories and I would like to change it to subdomains.
Old structure:
(de) example.com/
(en) example.com/en/
(fr) example.com/fr/
New structure:
(de) de.example.com/
(en) en.example.com/
(fr) fr.example.com/
My htaccess so far:
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^en/(.+) http://en.example.com/$1 [R=301,L,NC]
RewriteRule ^fr/(.+) http://fr.example.com/$1 [R=301,L,NC]
RewriteRule ^(.+) http://de.example.com/$1 [R=301,L,NC]
It's not working I'm getting the error message that redirects will never end.
Andreas