I followed the Craft directions for setting up a localized site. In the fifth step I followed the first example for setting up my folder structure. In my case the languages I'm working with are French and Arabic.

   fr/                 --> example.com/fr/ (french)
   ar/                 --> example.com/ar/ (arabic)

The primary language for the site is French, what is the best way to redirect so that if a visitor comes to the root of the site www.example.com they will be redirected to the French version at www.example.com/fr/ ?

Should I use a .htaccess file in main public_html directory of the site, should I use the dynamic routes in Craft, or is there some other, better, way?

2 Answers 2


I would put a .htaccess file in the public HTML folder and let Apache deal with it, that way you don't have the overhead of PHP/Craft having to deal with that request.


Here's the setup I used for the .htaccess file if anyone is interested:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) http://example.com/new_directory/ [R=301,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.