Hi,
I'm tinkering around with this one for several hours now...
What I try to accomplish is, to redirect
http://xrms.mydomain.com
to http://mydomain.com/xrms
and set up an language redirection by the users browsers preffered setting. this is the my .htaccess so far:
Code:
RewriteEngine On
Options FollowSymLinks
RewriteCond %{REQUEST_URI} ^/?$ [NC]
RewriteCond %{HTTP_HOST} ^xrms\..*$ [NC]
RewriteRule (.*) http://mydomain\.com/xrms [R,L]
RewriteCond %{REQUEST_URI} ^/?$ [NC]
RewriteCond %{HTTP:Accept-Language} (de) [NC]
RewriteRule ^(.*)$ http://www\.mydomain\.com/concrete_de/news [R,L]
RewriteCond %{REQUEST_URI} ^/?$ [NC]
RewriteCond %{HTTP:Accept-Language} (pl) [NC]
RewriteRule ^(.*)$ http://www\.mydomain\.com/concrete_pl/news [R,L]
RewriteCond %{REQUEST_URI} ^/? [NC]
RewriteRule ^(.*)$ http://www\.mydomain\.com/concrete_en/news [R,L]
As you see, the user shoul be forwarded to /xrms if domain begins with xrms.*. If not, the language handling comes into place:
move to german site if german is supported, polish site if polish and default to english site.
BUT: that doesn't work, thats why I'm hoping for some hints from you..
without the first rule, whe language handling works fine.
without the language-rules, the first one works fine, too.
but together they don't.
xrms.mydomain.com is handled by the other rules while it should not, and I am redirected to their destinies.
Any idea on this?
|