[Solved] GTranslate PRO htaccess prevents php from running.

Popular automatic website translation tool

[Solved] GTranslate PRO htaccess prevents php from running.

Postby technicaldaniel » Wed Aug 03, 2011 7:48 am

Hey there,

I just got the PRO version of GTranslate, however upon successfully integrating the pro version, I have found that a part of my page will no longer load. I am using Joomla 1.5 CMS and a PHP mod which uses a JavaScript load() function to get a php file from another sub directory (i.e. /sam/files/script.php) and display it on the index page. This worked very well before GTranslate PRO was installed. It also worked fine with the Free version of GTranslate.

Now I've isolated the problem to the .htaccess file. When the GTranslate entries are put in, the script doesn't load and just shows a blank space. However, when the GTranslate entries are removed, the script (and page) loads perfectly - however this obviously prevents GTranslate from working.

Other than that, GTranslate works very well, but that script is kind of crucial. :\ Any help would be very much appreciated. :)
Last edited by technicaldaniel on Thu Aug 04, 2011 6:11 am, edited 1 time in total.
technicaldaniel
 
Posts: 9
Joined: Wed Aug 03, 2011 7:40 am

Re: GTranslate PRO htaccess prevents php/js from running.

Postby Edvard » Wed Aug 03, 2011 4:21 pm

Hi,

Do you have js folder or any other 2 letter folders inside your www root directory?

I cannot check your website, since it is offline.
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: GTranslate PRO htaccess prevents php/js from running.

Postby technicaldaniel » Wed Aug 03, 2011 4:53 pm

edo888 wrote:Hi,

Do you have js folder or any other 2 letter folders inside your www root directory?

I cannot check your website, since it is offline.


Yes I do have a js folder.
technicaldaniel
 
Posts: 9
Joined: Wed Aug 03, 2011 7:40 am

Re: GTranslate PRO htaccess prevents php/js from running.

Postby Edvard » Wed Aug 03, 2011 7:31 pm

Try to use this rewrite rules instead:

# 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]
RewriteCond %{REQUEST_URI} !^/js
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteCond %{REQUEST_URI} !^/js
RewriteRule ^([a-z]{2}|zh-CN|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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: GTranslate PRO htaccess prevents php/js from running.

Postby technicaldaniel » Thu Aug 04, 2011 6:10 am

Ah thanks, that worked really well. Thank you for your help. :)
technicaldaniel
 
Posts: 9
Joined: Wed Aug 03, 2011 7:40 am


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux