Skip to content

Commit

Permalink
Add a simple 404 error page
Browse files Browse the repository at this point in the history
Initial try at issue #144
  • Loading branch information
johndrinkwater committed Mar 10, 2015
1 parent 6e3b429 commit 7a37e64
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# DirectoryIndex news.php

ErrorDocument 404 /error-page/404.php

RewriteBase /
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$
Expand Down
19 changes: 19 additions & 0 deletions error-page/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
$pageTitle = "404 Not Found";
include_once('../includes/header.php');

echo <<<DOCUMENT
<h1 class="text-center">404 Not Found</h1>
<article class="panel panel-danger">
<header class="panel-heading">
<h3 class="panel-title">Unable to retrieve file</h3>
</header>
<div class="panel-body">
<p>The file you have tried to access does not exist</p>
</div>
</article>
DOCUMENT;

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

0 comments on commit 7a37e64

Please sign in to comment.