jeudi 6 décembre 2018

htaccess redirect prefix to a domain

I made a website with 2 langages. I have a specific domain for each one. I bought them and they point to the same directory (so they display the same site).

I'd love to redirect each langage to its specific domain.

I tried that :

RewriteRule ^fr/(.*)$ https://www.french-domain.com/fr/$1 [L,R=301]

RewriteRule ^en/(.*)$ https://www.english-domain.com/en/$1 [L,R=301]

But it creates an error with loop.

Anyone have an idea ? Thanks.




Aucun commentaire:

Enregistrer un commentaire