Forum Archive - Specific languages only in htaccess

Specific languages only in htaccess
Apr 8, 2011 1:47 pm by daniellima
Hello I want to restrict only feels languages to be translated and access, in .htaccess. For example, only fr,en,uk and sw: If I change RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ ............................. RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ ................... To RewriteRule ^(fr|en|uk|sw)/(fr|en|uk|sw)/(.*)$ /$1/$3 [R=301,L] RewriteRule ^(fr|en|uk|sw)/(fr|en|uk|sw)$ /$1/ [R=301,L] RewriteRule ^(fr|en|uk|sw)/(.*)$ ............................. RewriteRule ^(fr|en|uk|sw)$ ................... Is it correct? I dont understand why in this line ([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW) repeat "([a-z]{2}|zh-CN|zh-TW)" two times? Thanks
Re: Specific languages only in htaccess
Apr 8, 2011 3:46 pm by Edvard
Yes it is correct.

SIMILAR TOPICS

Translate website to any specific language, on page loadJan 19, 2019 6:49 amReplies: 1Post by: Leaon7756
How do I add Indian languages in Drupal GTranslate?Sep 18, 2011 6:10 amReplies: 26Post by: rag_gupta
Code to use in Google Analytics to track languagesNov 16, 2015 10:46 amReplies: 9Post by: lucysadler
Different languages - different bannersMar 27, 2018 11:20 amReplies: 3Post by: samdo
What happens if site already has two or more languages ?Sep 14, 2017 5:54 amReplies: 7Post by: Sarge2017

Try GTranslate with a free 15 day trial