![]() |
Set Header 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: Set Header 404 (/showthread.php?tid=61543) |
Set Header 404 - wolfgang1983 - 04-24-2015 I am new to out put class. What I am trying to achieve is if category not found then will go to my custom not found page. I think it's working but not sure if I have used this correct $this->output->set_status_header('404'); PHP Code: <?php RE: Set Header 404 - codinghamster - 04-24-2015 Hi. The way you used the set_status_header() is perfectly fine. Another option is to use helper function show_404() which will automatically load the application/errors/error_404.php or application/views/errors/html/error_404.php template depending on your CodeIgniter version and terminate controller execution. |