I have a website in English http://example.com
Then I want to add code for a redirect to my subdomain PT language http://pt.example.com
if the browser language is PT
RewriteEngine on
RewriteCond %{HTTP:Accept-Language} (pt) [NC]
RewriteRule .* http://pt.example.com [R,L]
When I add this I get a redirect loop in the browser.
I have tried example.com/pt
and get the same error from the browser.
Add a RewriteCond :
RewriteCond %{HTTP_HOST} !^pt\.example\.com