From bcadfb6dd33a2cdbf58ab353b10b4348a9ea85fe Mon Sep 17 00:00:00 2001 From: "Alfonso Saavedra \"Son Link" Date: Sun, 7 Apr 2024 22:41:34 +0200 Subject: [PATCH] Added 404 error page --- app/Config/Routes.php | 1 + app/Views/404.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 app/Views/404.php 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 @@ + +
+

404 - Page Not Found

+ + + +

+ + + + Sorry! Cannot seem to find the page you were looking for. + +

+
+ \ No newline at end of file