diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 72fd1f7..f3d5241 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -6,6 +6,7 @@ use CodeIgniter\Router\RouteCollection; * @var RouteCollection $routes */ $routes->get('/', 'Home::index'); +$routes->set404Override('App\Controllers\Home::error404'); $routes->get('user/(:any)', 'Users::user/$1'); $routes->get('car/(:any)', 'Cars::index/$1'); $routes->get('track/(:any)', 'Tracks::index/$1'); diff --git a/app/Views/404.php b/app/Views/404.php new file mode 100644 index 0000000..e90df2a --- /dev/null +++ b/app/Views/404.php @@ -0,0 +1,15 @@ += get_header('404: Page not found') ?> +
+ + = nl2br(esc($message)) ?> + + Sorry! Cannot seem to find the page you were looking for. + +
+