Cannot redirect 404 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Cannot redirect 404 (/showthread.php?tid=64469) |
Cannot redirect 404 - spider58 - 02-23-2016 Hello. I made custom 404 page routes.php Code: $route['404_override'] = 'my404_controller'; application/controllers/my404_controller.php PHP Code: class my404_controller extends CI_Controller { and application/views/templates/default/404.php Code: <?php im calling show_404(); when article doesn't exists. But shows codeigniter's error page not my custom 404 view. The page you requested was not found. how can i fix it. thanks inadvance. RE: Cannot redirect 404 - freddy - 02-23-2016 remember you should write with capital every controller, do you use linux or windows ? please tested it first, then let me know it working or not and name it My404_controller.php Code: class My404_controller extends CI_Controller { wait i guess i'm doing wrong RE: Cannot redirect 404 - spider58 - 02-23-2016 (02-23-2016, 01:38 AM)freddy Wrote: remember you should write with capital every controller, do you use linux or windows ? doesn't worked RE: Cannot redirect 404 - freddy - 02-23-2016 (02-23-2016, 03:25 AM)spider58 Wrote:(02-23-2016, 01:38 AM)freddy Wrote: remember you should write with capital every controller, do you use linux or windows ? just suggest edit file view error not found if you don't get it |