Welcome Guest, Not a member yet? Register   Sign In
404_override ?
#6

[eluser]Remko Posthuma[/eluser]
You have to define a valid route, so the function in the routed controller should exist. If the function doesn't exist the default error page will be shown.

Step1: Define the route "404_override" in your routes.php config file:
Code:
$route['404_override']             = "home/show_404";
Step 2: Open the controller and define a function show_404. In my case this will be the home.php controller
Code:
function show_404()
{
    $this->output->set_status_header('404');
    echo "404 - not found";
}
This should work :-)


Messages In This Thread
404_override ? - by El Forum - 08-20-2010, 01:56 AM
404_override ? - by El Forum - 08-20-2010, 02:19 AM
404_override ? - by El Forum - 08-20-2010, 02:33 AM
404_override ? - by El Forum - 09-11-2010, 01:29 AM
404_override ? - by El Forum - 09-22-2010, 12:43 AM
404_override ? - by El Forum - 01-14-2011, 06:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB