How do I harden OC against "Cannot find controller" errors?
Posted: Wed Oct 09, 2013 7:21 pm
Hello,
I am customizing a very nice OC installation, including vQMods, Override Engine, SEO URLs with NGinx and so on.
It's all very nice and dandy but i'd like to harden it against a very common error:
Blank page with:
Notice: Cannot find controller class file for route 'about' in /var/www/hostname/public_html/system/engine/factory.php on line 152
In order to get that error all I need is to replace one bit in the URL with a random word.
I know, end users are probably not going to tamper with the URLs and replace:
http://www.domain.tld/about_us
with
http://www.domain.tld/about
But:
1) It's very ugly to crash a polished website and spam OC log entries just because somebody entered a word.
Log:
2013-10-09 11:02:28 - PHP Notice: Cannot find controller class file for route 'about' in /var/www/hostname/public_html/system/engine/factory.php on line 152
2) Malicious users WILL get information about the installed software, server layout and configuration and thus get an edge into hacking into the website.
What I'd like to do is to replace the blank page with something as basic as the "Not found" page.
Is there any kind soul who could please tell me the 2-3 lines to write in to achieve that effect, and where to put them?
Thanks in advance.
I am customizing a very nice OC installation, including vQMods, Override Engine, SEO URLs with NGinx and so on.
It's all very nice and dandy but i'd like to harden it against a very common error:
Blank page with:
Notice: Cannot find controller class file for route 'about' in /var/www/hostname/public_html/system/engine/factory.php on line 152
In order to get that error all I need is to replace one bit in the URL with a random word.
I know, end users are probably not going to tamper with the URLs and replace:
http://www.domain.tld/about_us
with
http://www.domain.tld/about
But:
1) It's very ugly to crash a polished website and spam OC log entries just because somebody entered a word.
Log:
2013-10-09 11:02:28 - PHP Notice: Cannot find controller class file for route 'about' in /var/www/hostname/public_html/system/engine/factory.php on line 152
2) Malicious users WILL get information about the installed software, server layout and configuration and thus get an edge into hacking into the website.
What I'd like to do is to replace the blank page with something as basic as the "Not found" page.
Is there any kind soul who could please tell me the 2-3 lines to write in to achieve that effect, and where to put them?
Thanks in advance.