Htaccess rewrite top domain in Joomla based on language

670 Views Asked by At

I've a mysite.it with joomla, the site is in /home subdirectory, in the root / there's an htaccess with RewriteRule ^(.*)$ /home/$1 [L] RewriteRule ^(/)?$ home/index.php [L] so the /home is hidden. I've also joomfish installed for a secondary (en) language, modrewrite on and no friendly url. I've also bought a secondary mysite.us and it now simply redirects to the english joomsifh-managed lannguage. SO ;) what I want to do, if possible is sorta like: if language detected is english, rewrite mysite.it with mysite.us (and please don't touch the joomlish ulr ;) )

is that clear? any idea from any htaccess master? :-)

p.s. I'm on my own linux vps server and joomla 1.5.26

1

There are 1 best solutions below

1
On

Try this :

`

# If prefered language contains english ...
RewriteCond %{HTTP:Accept-Language} en
# and if accessing .it domain
RewriteCond %{SERVER_NAME} .*it$
RewriteRule /(.*) http://mysite.us/$1 [R,L]

`