Specific languages only in htaccess

Popular automatic website translation tool

Specific languages only in htaccess

Postby daniellima » Fri Apr 08, 2011 5:47 pm

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
daniellima
 
Posts: 17
Joined: Sat Apr 02, 2011 7:31 am

Re: Specific languages only in htaccess

Postby Edvard » Fri Apr 08, 2011 7:46 pm

Yes it is correct.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux