[Solved] Error on non-existing 2 letter url's

Popular automatic website translation tool

[Solved] Error on non-existing 2 letter url's

Postby theprezz » Wed Feb 01, 2012 11:03 pm

Hello,

Whenever I reach an address on my site that is NOT a language, it shows me an error page instead of a 404 page.
For example:

http://oneprovider.com/sd

See all the errors:

Warning: file_put_contents(cache/sd/692864eadf431ed2652e0c683f2e4ff1) [function.file-put-contents]: failed to open stream: No such file or directory in /home/oneprovi/public_html/gtranslate/translate.php on line 218

The site loads normally below (but all links now have /sd/ in them and obviously it still breaks. It should redirect to a 404 page, as here:

http://oneprovider.com/sdd

Any ideas or updates?

Thanks!
theprezz
 
Posts: 5
Joined: Wed Oct 05, 2011 9:07 pm

Re: Error on non-existing 2 letter url's

Postby Yana » Thu Feb 02, 2012 1:51 am

Hi,
If it is not convenient for you to change links you can change rules for chosen languages in your .htaccess file.
For example you need to change [a-z]{2} to en|ru|fr|it|de
Regards,

Yana Ghahramanyan - 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
Yana
 
Posts: 4135
Joined: Thu Jan 12, 2012 6:21 pm

Re: Error on non-existing 2 letter url's

Postby theprezz » Fri Feb 03, 2012 12:43 am

Thanks Yana, that worked! I just needed to find the list of languages, here it is if anyone else needs it :

af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|th|tr|uk|ur|vi|cy|yi|zh-CN|zh-TW)/(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|th|tr|uk|ur|vi|cy|yi|zh-CN|zh-TW
theprezz
 
Posts: 5
Joined: Wed Oct 05, 2011 9:07 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux