Disable translation in subdirectories

Popular automatic website translation tool

Disable translation in subdirectories

Postby [email protected] » Fri Nov 19, 2010 2:49 am

Hello,

I have a member's area and a sign-up area of my website, because both areas use https and are forced with htaccess the translation script doesn't work, and if I disable SSL the translated pages still don't allow login to my member's area. I was wondering if there is a way to disable translation in a sub-directory.

Ex: http://www.domain.com/nl/ for dutch translation, then when the user clicks on either the signup link or members area link the /nl/ is removed and the user is sent to the original page.

EX: http://www.domain.com/nl/ clicking on signup would normally produce http://www.domain.com/nl/signup/signup.php ---> I need htaccess to remove /nl/ and stop translation so the user is sent to http://www.domain.com/signup/signup.php

Thank You,
Jason
[email protected]
 
Posts: 5
Joined: Fri Nov 19, 2010 2:43 am

Re: Disable translation in subdirectories

Postby Edvard » Fri Nov 19, 2010 2:38 pm

Hi,

You need to modify # gtranslate config block in your .htaccess this way:
Code: Select all
# gtranslate config
RewriteRule ^[a-z]{2}/signup/signup.php$ /signup/signup.php [QSA]
RewriteRule ^zh-CN/signup/signup.php$ /signup/signup.php [QSA]
RewriteRule ^zh-TW/signup/signup.php$ /signup/signup.php [QSA]

RewriteRule ^([a-z]{2})/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2})$ /gtranslate/translate.php?lang=$1 [L,QSA]
RewriteRule ^(zh-CN)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^(zh-CN)$ /gtranslate/translate.php?lang=$1 [L,QSA]
RewriteRule ^(zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^(zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
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



Re: Disable translation in subdirectories

Postby Edvard » Sun Nov 21, 2010 2:04 pm

Good to hear that :)
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