Forum Archive - Disable translation in subdirectories

Disable translation in subdirectories
Nov 18, 2010 10:49 pm by [email protected]
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
Re: Disable translation in subdirectories
Nov 19, 2010 10:38 am by Edvard
Hi, You need to modify # gtranslate config block in your .htaccess this way: # 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]
Re: Disable translation in subdirectories
Nov 21, 2010 8:11 am by [email protected]
Hello, Great.. That solution worked perfectly. Thank you for creating this awesome script. Just out of curiosity how long does google take to index the translated pages on average. I've created the site-map and submitted to Google webmaster tools. Just waiting now.. Thanks Again :D
Re: Disable translation in subdirectories
Nov 21, 2010 8:14 am by [email protected]
Hello, I spoke too soon :lol: Google has already begun indexing my translated site. Thank You
Re: Disable translation in subdirectories
Nov 21, 2010 10:04 am by Edvard
Good to hear that :)
Re: Disable translation in subdirectories
Nov 22, 2010 1:50 am by [email protected]
Hello Sir, I have one more question about a link on my site which I don't want to be translated but I don't want to post my URL here. Could you email me please so I can send the question directly to you? Thank You
Re: Disable translation in subdirectories
Nov 23, 2010 6:47 pm by [email protected]
Hello, Did you receive my email message with the htaccess rewrite changes I need made? Thank You.

SIMILAR TOPICS

German translation changes the centuryDec 31, 2018 3:06 pmReplies: 1Post by: adrievdl
Graphic translation for every language is missingDec 19, 2018 7:54 amReplies: 1Post by: Daryl Dixon
Problem of translation in my websiteDec 8, 2018 12:15 pmReplies: 1Post by: Ibrahim
Disable translating of a part of my textNov 20, 2018 11:29 amReplies: 3Post by: Ellie741
translation works only with ctrl + f5 in browser help pleaseNov 15, 2018 1:10 pmReplies: 1Post by: milangomes

Try GTranslate with a free 15 day trial