[Solved] Error on non-existing 2 letter url's
Feb 1, 2012 7:03 pm by theprezz
Feb 1, 2012 7:03 pm by theprezz
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!
Re: Error on non-existing 2 letter url's
Feb 1, 2012 9:51 pm by Yana
Feb 1, 2012 9:51 pm by Yana
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
Re: Error on non-existing 2 letter url's
Feb 2, 2012 8:43 pm by theprezz
Feb 2, 2012 8:43 pm by theprezz
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
SIMILAR TOPICS
Gtranslate: Error with number | Feb 20, 2019 1:20 am | Replies: 1 | Post by: infact_dat |
Error message and URL problems | Feb 6, 2019 11:16 am | Replies: 1 | Post by: Kidbooo |
GT doesn't work...error 404 page | Jan 28, 2019 5:36 pm | Replies: 1 | Post by: vincenzodinuzzo |
Nginx 502 Error | Jan 11, 2019 2:15 pm | Replies: 1 | Post by: mightyfineprint |
Error message on click on the widget | Jan 6, 2019 9:52 pm | Replies: 1 | Post by: jmric68 |