From 1503c1f75fd650002779ea33eb7b479783e04f8d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 28 Jan 2013 16:32:52 +0100 Subject: [PATCH] Add 404 page --- frontend/rewrite.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/rewrite.php b/frontend/rewrite.php index 92dbb95..96ee3df 100644 --- a/frontend/rewrite.php +++ b/frontend/rewrite.php @@ -17,7 +17,15 @@ $router->routes = array( ) ); -$router->RouteRequest(); +try +{ + $router->RouteRequest(); +} +catch (RouterException $e) +{ + http_status_code(404); + $sPageContents = "404 not found"; +} echo($sPageContents);