CodeIgniter Forums

Full Version: 404_override and show_404
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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."