Hi, I have : domain.com and domain.at The .com site should point to the english site (lang=en) and the .at domain should point to the german site (lang=de) I managed to come up with: RewriteCond %{http_host}^domain.at [nc] RewriteRule ^(.*)$ http://www.domain.at/index.php?lang=de$1 [r=301,nc] It seems to work, default .com goes to english but what about .at's that has a www on it? when I type www.domain.at it goes directly to www.domain.com which is wrong... I have tried: RewriteCond %{http_host}^www.domain.at [nc] But that doesn't seem to work.. Help please? thanks for reading. (this is a joomla site btw)
Try this: RewriteCond %{HTTP_HOST} !^domain.com$ RewriteCond %{HTTP_HOST} !^www.domain.com$ RewriteRule ^(.*)$ http://www.domain.at/index.php?lang=de$1 [R=301,L] Code (markup): or this RewriteCond %{HTTP_HOST} ^(domain.at|www.domain.at)$ RewriteRule ^(.*)$ http://www.domain.at/index.php?lang=de$1 [R=301,L] Code (markup): Good luck