In config/routes.php
I set $route['404_override']='myerrorcontroller/amethod'
and it works for undefined controller class. My error controller class is called.
But if the controller exists while the method is not (eg. http://localhost/myexistingcontroller/myundefinedmethod
), the 404 page is CodeIgniter's default (http://www.apnacode.com/wp-content/uploads/2016/12/codeigniter_404.png).
How to solve this? Thanks.