Welcome Guest, Not a member yet? Register   Sign In
customize 404 page

Hello, I would like to show customized error page for 404. I found this http://ellislab.com/forums/viewthread/205487/#957444 but it redirects to another controller (url changes) - BUT I need to leave the same "wrong" url in browser's url bar intact (don't redirect to another controller) and just show another content in application\errors\error_404.php. How to override original error_404.php content?


You have $route['404_override'] = ''; in you route.php config.
You can set a controller like not_found.php and keep URL so you won't have a redirect.
$route['404_override'] = 'not_found';

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class not_found extends CI_Controller
function index()
  echo '404';
See more at the bottom of the page

Theme © iAndrew 2016 - Forum software by © MyBB