Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
404 page & notifier
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Weasel" data-source="post: 179092" data-attributes="member: 9520"><p>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 <a href="http://devbest.com/members/teso.8605/" target="_blank">Teso</a> for anoying me while working on this.</p><p> </p><p><strong>404.php:</strong></p><p>[PHP]<?php</p><p>$url = 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] .'';</p><p> </p><p>if (isset($url) && $_SESSION['error404'] != $url && !strpos($_SERVER['REQUEST_URI'], 'favicon.ico'))</p><p>{</p><p>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")."')");</p><p>$_SESSION['error404'] = $url;</p><p>}</p><p>?></p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml"></p><p><head></p><p><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></p><p><title>404 - Webpage not found!</title></p><p><style></p><p>body,html {</p><p>margin: 120px 0px 0px 0px;</p><p>padding: 0;</p><p>background-color: #16499A;</p><p>background-image: url('bg');</p><p>background-size: 1280px 292px;</p><p>background-repeat: no-repeat;</p><p>background-attachment: fixed;</p><p>background-position: 100% 100%;</p><p>font-family: 'SegoeWP-Light';</p><p>font-size: 14px;</p><p>color: white;</p><p>text-align: center;</p><p>}</p><p> </p><p>@font-face {</p><p>font-family: 'SegoeWP-Light';</p><p>src: url('SegoeWP-Light.ttf');</p><p>}</p><p> </p><p>#wrapper {</p><p>margin: 0 auto 0 auto;</p><p>width: 700px;</p><p> </p><p>}</p><p> </p><p>#content {</p><p>width: 700px;</p><p>text-align: left;</p><p>}</p><p> </p><p>#main {</p><p>width: 100%;</p><p>height: auto;</p><p>font-size: 40px;</p><p>font-family: 'SegoeWP-Light';</p><p>}</p><p> </p><p>h1 {</p><p>font-size: 100px;</p><p>font-family: 'SegoeWP-Light';</p><p>margin-bottom: 25px;</p><p>}</p><p></style></p><p></head></p><p> </p><p><body></p><p><div id="wrapper"></p><p> </p><p><div id="content"></p><p><div id="main"></p><p><h1>:(</h1></p><p>We are sorry, but this page couldn't be found. The webmaster has been notified!</p><p></div></p><p></div></p><p> </p><p></div></p><p></body></p><p></html>[/PHP]</p><p> </p><p><strong>Database:</strong></p><p>[CODE]CREATE TABLE IF NOT EXISTS `page_errors` (</p><p> `id` int(11) NOT NULL AUTO_INCREMENT,</p><p> `url` varchar(40) NOT NULL,</p><p> `request_uri` varchar(25) NOT NULL,</p><p> `http_referer` varchar(40) NOT NULL,</p><p> `ip` varchar(18) NOT NULL,</p><p> `date` varchar(20) NOT NULL</p><p> PRIMARY KEY (`id`),</p><p>) ENGINE=MyISAM DEFAULT CHARSET=latin1</p><p>[/CODE]</p><p> </p><p><strong>Add this to your .htaccess:</strong></p><p>[CODE]ErrorDocument 404 /404.php[/CODE]</p><p> </p><p><strong>SegoeWP-Light .ttf file:</strong></p><p><a href="https://mega.co.nz/#!VwQQjTAQ!XdppCinbZ8KTZAcYLOrGiTsmahsfaHfwjJvSJj1F3VI" target="_blank">https://mega.co.nz/#!VwQQjTAQ!XdppCinbZ8KTZAcYLOrGiTsmahsfaHfwjJvSJj1F3VI</a></p><p> </p><p><strong>bg.png file:</strong></p><p><a href="https://mega.co.nz/#!hgoWWLJb!a4VaBxJILlWyy-0wvVG5ajqj5Q9lbPyxy_TpCZd662s" target="_blank">https://mega.co.nz/#!hgoWWLJb!a4VaBxJILlWyy-0wvVG5ajqj5Q9lbPyxy_TpCZd662s</a></p><p> </p><p>Hope you like it.</p><p>Preview: <a href="http://www.smashindustry.com/typehereanythingyouwant" target="_blank">http://www.smashindustry.com/typehereanythingyouwant</a></p></blockquote><p></p>
[QUOTE="Weasel, post: 179092, member: 9520"] 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 [URL='http://devbest.com/members/teso.8605/']Teso[/URL] for anoying me while working on this. [B]404.php:[/B] [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>[/PHP] [B]Database:[/B] [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 [/CODE] [B]Add this to your .htaccess:[/B] [CODE]ErrorDocument 404 /404.php[/CODE] [B]SegoeWP-Light .ttf file:[/B] [URL]https://mega.co.nz/#!VwQQjTAQ!XdppCinbZ8KTZAcYLOrGiTsmahsfaHfwjJvSJj1F3VI[/URL] [B]bg.png file:[/B] [URL]https://mega.co.nz/#!hgoWWLJb!a4VaBxJILlWyy-0wvVG5ajqj5Q9lbPyxy_TpCZd662s[/URL] Hope you like it. Preview: [URL]http://www.smashindustry.com/typehereanythingyouwant[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
404 page & notifier
Top