Forum Archive - [Solved] GTranslate PRO htaccess prevents php from running.

[Solved] GTranslate PRO htaccess prevents php from running.
Aug 3, 2011 3:48 am by technicaldaniel
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. :)
Re: GTranslate PRO htaccess prevents php/js from running.
Aug 3, 2011 12:21 pm by Edvard
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.
Re: GTranslate PRO htaccess prevents php/js from running.
Aug 3, 2011 12:53 pm by technicaldaniel
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.
Re: GTranslate PRO htaccess prevents php/js from running.
Aug 3, 2011 3:31 pm by Edvard
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]
Re: GTranslate PRO htaccess prevents php/js from running.
Aug 4, 2011 2:10 am by technicaldaniel
Ah thanks, that worked really well. Thank you for your help. :)

SIMILAR TOPICS

Gtranslate MultisiteFeb 12, 2019 7:27 amReplies: 1Post by: infact_dat
Gtranslate: Error with numberFeb 20, 2019 1:20 amReplies: 1Post by: infact_dat
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not definedFeb 22, 2019 12:34 pmReplies: 1Post by: oase
Add-on gtranslate no longer worksFeb 2, 2019 6:01 amReplies: 1Post by: DarylDixon
Instragram and Gtranslate...!!!!Dec 19, 2018 11:18 amReplies: 1Post by: zackfernandes

Try GTranslate with a free 15 day trial