CodeIgniter – custom 404 error page

application/config/routes.php

$route['404_override'] = 'my404';

application/controllers/My404.php

output->set_status_header('404'); 
        $data['content'] = 'error_404'; // View name 
        $this->load->view('index', $data);//loading in my template 
    } 
}

Leave a Reply

Your email address will not be published. Required fields are marked *