From 7a37e64173350736178b8b065efbd29060a2a8c6 Mon Sep 17 00:00:00 2001 From: John Drinkwater Date: Tue, 10 Mar 2015 09:34:16 +0000 Subject: [PATCH] Add a simple 404 error page Initial try at issue #144 --- .htaccess | 2 ++ error-page/404.php | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 error-page/404.php diff --git a/.htaccess b/.htaccess index 88218d1..9fbfe96 100644 --- a/.htaccess +++ b/.htaccess @@ -1,5 +1,7 @@ # DirectoryIndex news.php +ErrorDocument 404 /error-page/404.php + RewriteBase / RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*)$ diff --git a/error-page/404.php b/error-page/404.php new file mode 100644 index 0000000..d84d849 --- /dev/null +++ b/error-page/404.php @@ -0,0 +1,19 @@ +404 Not Found +
+
+

Unable to retrieve file

+
+
+

The file you have tried to access does not exist

+
+
+ +DOCUMENT; + + include_once('../includes/footer.php'); +