Hi Edvard a little help ?
May 4, 2011 2:13 pm by [email protected]
May 4, 2011 2:13 pm by [email protected]
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.
Re: Hi Edvard a little help ?
May 5, 2011 10:42 am by Edvard
May 5, 2011 10:42 am by Edvard
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...?
Re: Hi Edvard a little help ?
May 5, 2011 10:56 am by [email protected]
May 5, 2011 10:56 am by [email protected]
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
Re: Hi Edvard a little help ?
May 5, 2011 11:37 am by Edvard
May 5, 2011 11:37 am by Edvard
Hi,
Can you please confirm that you have line breaks after every RewriteRule? It should look like this:
# 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...
Re: Hi Edvard a little help ?
May 5, 2011 11:51 am by [email protected]
May 5, 2011 11:51 am by [email protected]
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
Re: Hi Edvard a little help ?
May 6, 2011 9:19 am by Edvard
May 6, 2011 9:19 am by Edvard
You still have a line break missing....
It should look like this:
# gtranslate config
RewriteRule ..............
RewriteRule .............
RewriteRule .............
RewriteRule ............
You can add 2 line breaks to be sure:
RewriteRule ..............
RewriteRule .............
RewriteRule .............
RewriteRule ............
SIMILAR TOPICS
hi edvard - pls update my nameserver - humble request | Jan 28, 2011 8:44 am | Replies: 2 | Post by: [email protected] |