Add error pages

This commit is contained in:
Fred Boniface 2022-10-07 11:36:26 +01:00
parent bd2972ffbd
commit 3c1cf2d3e0
6 changed files with 85 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<?php
include "./php/age.php";
include "./page-blocks/head-content.php";
include "./page-blocks/footer.php";
?>

28
error-pages/403.php Normal file
View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<?php
include "./php/age.php";
include "./page-blocks/head-content.php";
include "./page-blocks/footer.php";
?>
<html>
<head>
<?php insert_head(); ?>
<title>Access Denied</title>
</head>
<body>
<h1 class="page-title">Access Denied</h1>
<div class="page-main-content">
<p>
I don't know where you are trying to go, but my server has decided
that you aren't allowed to go there and has given you this error.
</p>
<p>
If you followed a link and got this page then get in touch with the
person who sent you the link. If it was me - I'm sorry, I messed up.
</p>
</div>
<?php insert_footer(); ?>
</body>
</html>

28
error-pages/404.php Normal file
View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<?php
include "./php/age.php";
include "./page-blocks/head-content.php";
include "./page-blocks/footer.php";
?>
<html>
<head>
<?php insert_head(); ?>
<title>Not Found</title>
</head>
<body>
<h1 class="page-title">Not Found</h1>
<div class="page-main-content">
<p>
I don't know where you are trying to go, but wherever it is, it
doesn't exist.
</p>
<p>
If you followed a link and got this page then get in touch with the
person who sent you the link. If it was me - I'm sorry, I messed up.
</p>
</div>
<?php insert_footer(); ?>
</body>
</html>

24
error-pages/50x.html Normal file
View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="./css/styles.css">
<title>Sorry - We messed up</title>
</head>
<body>
<h1 class="page-title">Server Error</h1>
<div class="page-main-content">
<p>
Sorry, there's been an error at my end.
</p>
<p>
Try going <a href="https://fredboniface.co.uk">home</a> or try again
later.
</p>
</div>
</body>
</html>

View File

@ -2,7 +2,8 @@
<?php
include "./php/age.php";
include "./page-blocks/footer.php;"
include "./page-blocks/head-content.php";
include "./page-blocks/footer.php";
?>
<html>

View File

@ -1,7 +1,8 @@
<!DOCTYPE html>
<?php
include "./page-blocks/footer.php;"
include "./page-blocks/head-content.php";
include "./page-blocks/footer.php";
?>
<html>