views:

25

answers:

0

I created a site in 2 languages english (en) and arabic (ar). Whenever a visitor comes to mysite.com (index) he chooses a language and he will be either directed to ar.mysite.com or en.mysite.com ...the problem and you already know it, don't you? is that he is redirected to mysite.com/en/index.php instead of en.mysite.... and the same story goes with the arabic directory...Now I have been able to fix this issue in the arabic directory, meaning that whenever you try to go to the arabic version of the site you will be directed to ar.starety.com. I uploaded this .htaccess file to the arabic directory :

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ([a-z0-9-]+)/? http://$1.mysite.com [R=301,NC,L]

but the same exact code doesn't work on the english version, when I upload it to the english directory nothing happens....Any help?