diff --git a/index.php b/index.php index 96359ff..ec8317d 100644 --- a/index.php +++ b/index.php @@ -138,4 +138,11 @@ if(is_array($match) && is_callable($match['target'])) { } } else { // No route was matched + $content = file_get_contents("pages/template.html"); + $pageTitle = "404"; + $pageContent = "404 - This page could not be found :("; + $content = str_replace('%TITLE%', $pageTitle, $content); + $content = str_replace('%CONTENT%', $pageContent, $content); + header('Content-Type: text/html; charset=utf-8'); + echo($content); } diff --git a/pages/404.html b/pages/404.html new file mode 100644 index 0000000..89df2a5 --- /dev/null +++ b/pages/404.html @@ -0,0 +1,43 @@ + + +
+ + + +