CodeIgniter Forums
404_override and show_404 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forum-6.html)
+--- Forum: Issues (https://forum.codeigniter.com/forum-19.html)
+--- Thread: 404_override and show_404 (/thread-61748.html)



404_override and show_404 - Ansalux - 05-13-2015

Hi guys, this is my frist post in CI community although i use this framework from a couple of years.

I think that if in route config file i change the default controller for 404 error, when i call the function "show_404" this function should call my custom 404 controller as setted in config file instead of simply load the default CI error view.
I m wrong?

Sorry for my english and thanks! Rolleyes


RE: 404_override and show_404 - kilishan - 05-13-2015

Nope - won't work that way. According to the manual:

"This route indicates which controller class should be loaded if the requested controller is not found. It will override the default 404 error page. It won’t affect to the show_404() function, which will continue loading the default error_404.php file at application/views/errors/error_404.php."