Subdirectory Translations

Popular automatic website translation tool

Subdirectory Translations

Postby [email protected] » Wed Jan 05, 2011 3:54 pm

I am having very strange problem..... Google has pickup the followin URL's
I mean I dont want the subdirectory "el" of "sw"to be shown because it causes double metatags in Webmaster Tools.
Why this is happening and what can I do about it?
[email protected]
Posts: 9
Joined: Wed Jan 05, 2011 3:45 pm

Re: Subdirectory Translations

Postby Edvard » Tue Feb 08, 2011 2:52 pm


Please use this rewrite rules instead of the old ones:

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

This will prevent the indexing of double language codes, and if you access for example: /sw/el/page-1.html you will end up on /sw/page-1.html

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
Site Admin
Posts: 4403
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

  • Related Topics
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest