Girando ho trovato questo 
Codice PHP:
<?php
$error = $_SERVER['REDIRECT_STATUS']; // - Displays HTTP response from original page, 404, 500 etc.
switch($error){
case 404:
$title = 'Error 404 - Page not found';
$error = '';
break;
case 400:
$title = 'Error 400 - Bad Request';
$error = 'Your browser sent a request that this server could not understand.';
break;
case 401:
$title = 'Error 401 - Authorization Required';
$error = 'This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn\'t understand how to supply the credentials required.';
break;
case 403:
$title = 'Error 403 - Forbidden';
$error = 'You don\'t have permission to access on this server';
break;
case 405:
$title = 'Error 405 - Method Not Allowed';
$error = '';
break;
case 406:
$title = 'Error 406 - Not Acceptable';
$error = '';
break;
case 409:
$title = 'Error 409 - Conflict';
$error = '';
break;
case 413:
$title = 'Error 413 - Request Entity Too Large';
$error = 'The requested resource does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit.';
break;
case 414:
$title = 'Error 414 - Request-URI Too Large';
$error = 'The requested URL\'s length exceeds the capacity limit for this server.';
break;
case 500:
$title = 'Error 500 - Internal Server Error';
$error = 'The server encountered an internal error or misconfiguration and was unable to complete your request.';
break;
case 501:
$title = 'Error 501 - Method Not Implemented';
$error = 'GET to URL not supported.';
break;
default:
$title = 'Error '.$error;
$error = '';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="http://localhost/rustytesto/PogSiteV2/Includes/css.css">
<title><?php echo $title ?></title>
<style type="text/css">
img{
position: absolute;
top: 15px;
left: 25px;
}
#error{
position: absolute;
margin: 0 25px 25px 0;
top: 75px;
left: 300px;
}
</style>
</head>
<body>
[img]/images/Error.jpg[/img]
<div id='error'>
<H1><?php echo $title;?></H1>
<?php echo $error; ?></p>
</div>
</body>
</html>
Spero sia abbastanza chiaro...
Ovviamente è da includere in tutte le pagine!