Weasel
👄 I'd intercept me
As I was working on my site again, I made a little 404 page (matching my theme on my website). I edited so it isn't using my classes anymore, if something isn't working, please say so, I'll fix it. Thanks to
404.php:
Database:
Add this to your .htaccess:
SegoeWP-Light .ttf file:
bg.png file:
Hope you like it.
Preview:
You must be registered for see links
for anoying me while working on this.404.php:
PHP:
<?php
$url = 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] .'';
if (isset($url) && $_SESSION['error404'] != $url && !strpos($_SERVER['REQUEST_URI'], 'favicon.ico'))
{
mysql_query("INSERT INTO page_errors(url, request_uri, http_referer, ip, date) VALUES ('".$url."', '".$_SERVER['REQUEST_URI']."', '".$_SERVER['HTTP_REFERER']."', '".$$_SERVER['REMOTE_ADDR']."', '".date("d-m-Y H:i")."')");
$_SESSION['error404'] = $url;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>404 - Webpage not found!</title>
<style>
body,html {
margin: 120px 0px 0px 0px;
padding: 0;
background-color: #16499A;
background-image: url('bg');
background-size: 1280px 292px;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 100% 100%;
font-family: 'SegoeWP-Light';
font-size: 14px;
color: white;
text-align: center;
}
@font-face {
font-family: 'SegoeWP-Light';
src: url('SegoeWP-Light.ttf');
}
#wrapper {
margin: 0 auto 0 auto;
width: 700px;
}
#content {
width: 700px;
text-align: left;
}
#main {
width: 100%;
height: auto;
font-size: 40px;
font-family: 'SegoeWP-Light';
}
h1 {
font-size: 100px;
font-family: 'SegoeWP-Light';
margin-bottom: 25px;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="content">
<div id="main">
<h1>:(</h1>
We are sorry, but this page couldn't be found. The webmaster has been notified!
</div>
</div>
</div>
</body>
</html>
Database:
Code:
CREATE TABLE IF NOT EXISTS `page_errors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(40) NOT NULL,
`request_uri` varchar(25) NOT NULL,
`http_referer` varchar(40) NOT NULL,
`ip` varchar(18) NOT NULL,
`date` varchar(20) NOT NULL
PRIMARY KEY (`id`),
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Add this to your .htaccess:
Code:
ErrorDocument 404 /404.php
SegoeWP-Light .ttf file:
You must be registered for see links
bg.png file:
You must be registered for see links
Hope you like it.
Preview:
You must be registered for see links