Hi Edvard a little help ?

Popular automatic website translation tool

Hi Edvard a little help ?

Postby [email protected] » Wed May 04, 2011 6:13 pm

Hi Edvard,

Sorry to trouble you, and I hope it's a basic question. Our website has your extension enabled however, I get the error 404 page with the lang/URL correct.

I checked your trouble shooting guide as below, and confirm that the criteria have all been met ?

Can you help.

Many thanks.

When I select a language I'm being redirected to a URL with the language code, but it gives 404 not found error.

- Make sure that you have uploaded gtranslate folder to your www root folder. ----- YES

- Make sure that you have .htaccess file and have placed # gtranslate config block to the next line of RewriteEngine On line in it. ------ YES Done

- Make sure that you have Apache mod_rewrite or an alternative installed on your server (check with your hosting provider). ----- Yes... host enabled.
[email protected]
 
Posts: 3
Joined: Wed May 04, 2011 6:02 pm

Re: Hi Edvard a little help ?

Postby Edvard » Thu May 05, 2011 2:42 pm

Hi,

Can you post your .htaccess here?

I can see that you have link which contain 2 letters URI (http://domain.com/at, http://domain.com/rs), that can be confused with the languages like http://domain.com/it, http://domain.com/fr, etc... Is it possible to use road-safety instead of rs, etc...?
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: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Hi Edvard a little help ?

Postby [email protected] » Thu May 05, 2011 2:56 pm

Hi Ed,

Here you go ! ... I will look into changing the 2 letter URL's Cheers

Options +FollowSymLinks

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] 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]

#RewriteBase /

## Back-end access (only for temp URLs)
RewriteCond %{HTTP_HOST} ^.+\.directrouter\.co(m|\.uk)$ [OR]
RewriteCond %{HTTP_HOST} ^.+\.\x72\x6F\x63\x68\x65\x6E\.\x63\x6F(m|\.uk)$
RewriteCond %{REQUEST_URI} (\/~.+?\/)
RewriteRule ^(administrator[/]?)$ %1$1/index.php [L]

### Server protection rules, by Nicholas K. Dionysopoulos (Oct 2009)
## Add exceptions in the area between the dashed lines
## ----------

## Example rule: allow access to plugins/system/GoogleGears/gears-manifest.php. Remove the
## hash in front of the next line to enable
# RewriteRule ^(plugins/system/GoogleGears/gears-manifest.php)$ $1 [L]

## ----------

## If you use a template which requires direct access to PHP files inside its directory
## (for example RocketTheme's templates) uncomment the following line:
# RewriteRule ^(administrator/templates/.*\.php)$ - [L]

## DO NOT MODIFY BELOW THIS LINE!

## Back-end protection
RewriteRule ^(administrator[/]?)$ $1/index.php [L]
RewriteRule ^(administrator/index.htm[l]?)$ - [L]
RewriteRule ^(administrator/index.php)$ - [L]
RewriteRule ^(administrator/index[2-3].php)$ - [L]
RewriteRule ^(administrator/(components|modules|images|templates)/.*\.(jpe[g,2]?|jpg|png|gif|bmp|css|js|swf|htm[l]?))$ - [L]
RewriteRule ^(administrator/.*\.php(.*))$ - [L]
RewriteRule ^administrator/(.*)$ index.php [F,L]

## Explicitly allow access only to XML-RPC's xmlrpc/index.php or plain xmlrpc/ directory
RewriteRule ^xmlrpc[/]?$ xmlrpc/index.php [L]
RewriteRule ^xmlrpc/index\.php$ xmlrpc/index.php [L]
RewriteRule ^xmlrpc/(.*)$ xmlrpc/index.php [F,L]

## Disallow front-end access for certain Joomla! system directories
RewriteRule ^(includes/js/.*)$ - [L]
RewriteRule ^(cache|includes|language|libraries|logs|tmp)/.*$ index.php [F,L]

### Server protection ENDS HERE

########## 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!
#
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%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})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

########## Begin - Joomla! core SEF Section (only for temp URLs)
#
RewriteCond %{HTTP_HOST} ^.+\.directrouter\.co(m|\.uk)$ [OR]
RewriteCond %{HTTP_HOST} ^.+\.\x72\x6F\x63\x68\x65\x6E\.\x63\x6F(m|\.uk)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteCond %{REQUEST_URI} (\/~.+?)\/
RewriteRule (.*) %1/index.php [C]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section (only for temp URLs)

########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
[email protected]
 
Posts: 3
Joined: Wed May 04, 2011 6:02 pm

Re: Hi Edvard a little help ?

Postby Edvard » Thu May 05, 2011 3:37 pm

Hi,

Can you please confirm that you have line breaks after every RewriteRule? It should look like this:

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]


One RewriteRule at one line...
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: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Hi Edvard a little help ?

Postby [email protected] » Thu May 05, 2011 3:51 pm

Hi,

There were no line breaks, however I have applied them as your request

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] 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]

#RewriteBase /

..... But still no language function ?

Cheers

Richard
[email protected]
 
Posts: 3
Joined: Wed May 04, 2011 6:02 pm

Re: Hi Edvard a little help ?

Postby Edvard » Fri May 06, 2011 1:19 pm

You still have a line break missing....

It should look like this:

Code: Select all
# gtranslate config
RewriteRule ..............
RewriteRule .............
RewriteRule .............
RewriteRule ............

You can add 2 line breaks to be sure:

Code: Select all
RewriteRule ..............

RewriteRule .............

RewriteRule .............

RewriteRule ............
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: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


Who is online

Users browsing this forum: No registered users and 1 guest

2GLux
cron