Forum Archive - [Solved] trouble with .htaccess ... i think

[Solved] trouble with .htaccess ... i think
Dec 18, 2011 8:28 am by daneel_olivaw
Hi im using gtranslate pro over a Joomla 1.7.3 installation with AceSEF 1.7.3 URL: http://www.mayanexplore.com php 5.2.17 curl: libcurl/7.21.6 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 json: 1.2.1 ioncube is installed im having troubles to make it work properly using the redirect method if i modify the .htaccess to add the lines that the instructions you provide i get the error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. if i dont edit the .htaccess the url seems to be generated ok (http://www.mayanexplore.com/es) but the browser cant find the page I have been trying to make it work so long :( i have changed everything that came to my mind. I would like to send you some captures, files, access to the site to see if you can help me. can you give me an email address? Thanks in advance.
Re: trouble with .htaccess ... i think
Dec 19, 2011 11:58 am by Edvard
Hi, Can you post the contents of your .htaccess file with the # gtranslate config added?
Re: trouble with .htaccess ... i think
Dec 21, 2011 7:57 am by daneel_olivaw
Hi Edvard this is the .htaccess: ## # @version $Id: htaccess.txt 21101 2011-04-07 15:47:33Z dextercowley $ # @package Joomla # @copyright Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved. # @license GNU General Public License version 2 or later; see LICENSE.txt ## ## # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE! # # The line just below this section: 'Options +FollowSymLinks' may cause problems # with some server configurations. It is required for use of mod_rewrite, but may already # be set by your server administrator in a way that dissallows changing it in # your .htaccess file. If using it causes your server to error out, comment it out (add # to # beginning of line), reload your site in your browser and test your sef url's. If they work, # it has been set by your server administrator and you do not need it set here. ## ## Can be commented out if causes errors, see notes above. #Options +FollowSymLinks ## Mod_rewrite in use. RewriteEngine On # 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_FILENAME} !-f 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] ## Begin - Rewrite rules to block out some common exploits. # If you experience problems on your site block out the operations listed below # This attempts to block the most common type of exploit `attempts` to Joomla! # # Block out any script trying to base64_encode data within the URL. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] # Block out any script that includes a <script> tag in URL. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] # Block out any script trying to set a PHP GLOBALS variable via URL. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] # Block out any script trying to modify a _REQUEST variable via URL. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) # Return 403 Forbidden header and show the content of the root homepage RewriteRule .* index.php [F] # ## End - Rewrite rules to block out some common exploits. ## Begin - Custom redirects # # If you need to redirect some pages, or set a canonical non-www to # www redirect (or vice versa), place that code here. Ensure those # redirects use the correct RewriteRule syntax and the [R=301,L] flags. # ## End - Custom redirects ## # Uncomment following line if your webserver's URL # is not directly related to physical file paths. # Update Your Joomla! Directory (just / for root). ## # RewriteBase / ## Begin - Joomla! core SEF Section. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # # If the requested path and file is not /index.php and the request # has not already been internally rewritten to the index.php script RewriteCond %{REQUEST_URI} !^/index\.php # and the request is for something within the component folder, # or for the site root, or for an extensionless URL, or the # requested URL ends with one of the listed extensions RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC] # and the requested path and file doesn't directly match a physical file RewriteCond %{REQUEST_FILENAME} !-f # and the requested path and file doesn't directly match a physical folder RewriteCond %{REQUEST_FILENAME} !-d # internally rewrite the request to the index.php script RewriteRule .* index.php [L] # ## End - Joomla! core SEF Section. Thank you very much for your help
Re: trouble with .htaccess ... i think
Dec 21, 2011 9:28 am by daneel_olivaw
There it goes the config.php too: <?php define('MAIN_LANG', 'en'); // Main language code: en, ar, bg, hr, cn, ct, cs, da, et, tl, fi, fr, gl, el, iw, hi, es, nl, id, ja, ca, ko, lt, lv, mt, de, no, pt, ru, ro, sr, sk, sl, sv, th, tr, uk, hu, vi, it, pl, sq define('API_KEY', 'INSERT-YOUR-KEY'); // You can get your Google Translate API key from https://code.google.com/apis/console/?api=translate define('AUTO_DETECT_LANG', false); // set to true if you have mixed language content, works with Google only define('CACHE_TIME', 365*24*60*60); // 1 year by default, no need to decrease define('LICENSE', 'license.dat'); define('SSL_VERIFY_PEER', true); // disable if you get CA certificate error and cannot reconfigure your server to solve the issue define('FOLLOW_LOCATION', true); // if your site have redirects for some URLs and for that reason you see blank pages, you need to enable this feature define('USE_BING_TRANSLATOR', false); // Enable it to use Bing Translotor instead of Google Translate define('BING_API_KEY', 'INSERT-YOUR-KEY'); // If the option above is enabled you need to get your Bing API key from http://www.bing.com/developers/createapp.aspx (PHP SOAP client is required) define('DEBUG', false); // turn on for debug mode // username and password to edit translations, please change for security reasons, // this is not your google login/pass, you need to think something new define('USER', '***********'); define('PASS', '***********'); is it normal that the license.dat be empty?? Thanks in advance
Re: trouble with .htaccess ... i think
Dec 21, 2011 9:49 am by Edvard
Hi, The config and .htaccess look OK (set "es" as a main_lang in config). But I think you have changed the permissions for gtranslat/*.php files to 777. Make sure to leave them the default value after you upload (usually 644). Also, can you upload info.php file from the product package into your gtranslate directory, so I can access it directly http://www.mayanexplore.com/gtranslate/info.php
Re: trouble with .htaccess ... i think
Dec 21, 2011 6:20 pm by daneel_olivaw
The info.php seems not to be available at that position. it says: The server encountered an internal error or misconfiguration and was unable to complete your request. (mmm... the same problem as when i edit the htaccess to put the gtranslate codes) you can see it at: http://www.mayanexplore.com/info.php here goes captures to see the permisions to the files: www.mayanexplore.com/capture01.jpg www.mayanexplore.com/capture02.jpg by the moment i dont have the gtranslate codes on the htacess because its not working and every page i try to access transalating or not says: The server encountered an internal error or misconfiguration and was unable to complete your request. (thats why i thought it was a problem in the htaccess) changed the language in config.php as you told me also here it goes the content of the config.php in case you could see a problem there: <?php define('MAIN_LANG', 'es'); // Main language code: en, ar, bg, hr, cn, ct, cs, da, et, tl, fi, fr, gl, el, iw, hi, es, nl, id, ja, ca, ko, lt, lv, mt, de, no, pt, ru, ro, sr, sk, sl, sv, th, tr, uk, hu, vi, it, pl, sq define('API_KEY', 'INSERT-YOUR-KEY'); // You can get your Google Translate API key from https://code.google.com/apis/console/?api=translate define('AUTO_DETECT_LANG', false); // set to true if you have mixed language content, works with Google only define('CACHE_TIME', 365*24*60*60); // 1 year by default, no need to decrease define('LICENSE', 'license.dat'); define('SSL_VERIFY_PEER', true); // disable if you get CA certificate error and cannot reconfigure your server to solve the issue define('FOLLOW_LOCATION', true); // if your site have redirects for some URLs and for that reason you see blank pages, you need to enable this feature define('USE_BING_TRANSLATOR', false); // Enable it to use Bing Translotor instead of Google Translate define('BING_API_KEY', 'INSERT-YOUR-KEY'); // If the option above is enabled you need to get your Bing API key from http://www.bing.com/developers/createapp.aspx (PHP SOAP client is required) define('DEBUG', false); // turn on for debug mode // username and password to edit translations, please change for security reasons, // this is not your google login/pass, you need to think something new define('USER', '************'); define('PASS', '************');
Re: trouble with .htaccess ... i think
Dec 22, 2011 1:24 pm by Edvard
Hi, If you can give me FTP access I'll solve it for you. You can send it using the PM button on the right.
Re: trouble with .htaccess ... i think
Dec 22, 2011 1:33 pm by NaviPrince
Can you fix my installation of Gtranslate? It will not run pro.
Re: trouble with .htaccess ... i think
Dec 22, 2011 5:04 pm by daneel_olivaw
Sent! Thank you!!! :)
Re: trouble with .htaccess ... i think
Dec 25, 2011 2:58 pm by Edvard
Hi, It is installed, please check: http://mayanexplore.com/es/
Re: trouble with .htaccess ... i think
Dec 28, 2011 7:56 pm by daneel_olivaw
Dear Edvard!!! Thanks a lot!!! it works perfectly! :P Wish you a great new year

SIMILAR TOPICS

[SOLVED]double dropdownOct 26, 2017 8:26 amReplies: 3Post by: danielesantosubito
Potential threat identified in .htaccessMar 1, 2017 7:30 pmReplies: 3Post by: Hannah
[SOLVED] NOT WORKING, HELP PLEASE!Feb 12, 2017 4:53 pmReplies: 5Post by: TSM
Need help <SOLVED>Feb 6, 2017 1:48 pmReplies: 5Post by: blaxx
[solved] edit translations problemDec 15, 2011 10:05 pmReplies: 19Post by: slweb2

Try GTranslate with a free 15 day trial