Post: How to set up your own error 404 page
05-29-2011, 03:19 AM #1
<Jimbo>
</Jimbo>
(adsbygoogle = window.adsbygoogle || []).push({});
This is just real simple for people who would like their own error 404 page.

When a visitor encounters a 404 File Not Found error on your site, you're on the verge of losing the visitor that you've worked so hard to obtain through the search engines and third party links. Creating your custom 404 error page allows you to minimize the number of visitors lost that way.

E.g. You must login or register to view this content.

Step 1)
Create ".htacces" file. (Called just ".htaccess")
This step may not be necessary in all situations. Some web hosts already configure their web server so that it will look for a specific file in your web directory when a certain document cannot be found. If so, simply skip this step.

If your web server is not an Apache web server, you will have to find out from your web host what you need to do to enable the server to serve your customized file when a file cannot be found. This article only applies to websites that are hosted on Apache web servers.

Otherwise, the first thing you need to do is to add the following line to a file named .htaccess (note the preceding period). In most instances, no such file will exist, and you can simply create one with a text editor (such as Notepad on Windows). Incidentally, if you are using Notepad on Windows, you will need to enter ".htaccess" (including the opening and closing quotation marks) into the "Save As" dialog box when you create the file, otherwise Notepad will append a ".txt" extension behind your back when it creates the file.


And simply put in the following, press save & upload it to your home directory.
    ErrorDocument 404 /notfound.html 

Alternately download it here: You must login or register to view this content.

Then simply create a webpage called "notfound.html" upload that and voila.
Note, this applies for all sub directorys, but you can change the 404 error page for each individual directory.


Example valid html 404 error page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>Error 404</title>
<meta name="author" content="Jimbo" />
<meta name="copyright" content="Copyright Jimbo ©" />
<meta name="revisit-after" content="14 days" />
<meta name="distribution" content="Global" />
<meta name="rating" content="general" />
<meta name="description" content="Error 404 Page not found" />
<meta name="keywords" content="page, not, found, 404" />
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/404style.css" type="text/css" media="screen" />
</head>

<body>
<h1>Error 404 page not found.</h1>
<div class="pageContent container" id="main">
<p><a href="index.php">Home</a></p>
<h4>©Jimbo</h4>
</div>
<p>
<a href="https://validator.w3.org/check?uri=referer"><img
src="https://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</p>
<div id="myDiv"><object type="application/x-shockwave-flash" style="width:0px; height:0px;" data="https://www.youtube.com/v/oQ2bf1Q2FAo?fs=1&autoplay=1"><param name="movie" value="https://www.youtube.com/v/oQ2bf1Q2FAo?fs=1&autoplay=1" /></object>
</div>
</body>

</html>


Then the css style.
    body {
font: 85%/0.9 arial, helvetica, sans-serif;
background: #99A989 url(../images/bg.gif) repeat 0 0;
line-height: 130%;
width: 100%;
min-width: 970px;
color: black;
}
h1 {
font-family:"Arial Narrow",Arial,Helvetica,sans-serif;
font-size:30px;
font-weight:normal;
letter-spacing:1px;
padding-left:2px;
text-transform:uppercase;
white-space:nowrap;
margin-top:4px;
color:#FF0000;
text-align:center;
}

h4 {
font-size:10px;
font-weight:bold;
font-family:"Trebuchet MS",Arial, Helvetica, sans-serif;
letter-spacing:1px;
text-align:center;
text-decoration:none;
}

p {
font-size:20px;
font-weight:bold;
font-family:"Trebuchet MS",Arial, Helvetica, sans-serif;
letter-spacing:1px;
text-align:center;
text-decoration:none;
}


#container {
width:100%;
height:100%;
text-align:center;
}

#content {
width:740px;
margin:0 auto;
text-align:left;
padding:20px;
}
#main{
width:800px;
margin:60px auto;
}

.container{
margin-top:20px;

background:#FFFFFF;
border:1px solid #****E0;
padding:15px;

-moz-border-radius:20px;
-khtml-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius:20px;
}

Alternately download it from here: You must login or register to view this content.

Two virus scans:

You must login or register to view this content.
AhnLab-V3 2011.05.29.00 2011.05.28 -
AntiVir 7.11.8.161 2011.05.28 -
Antiy-AVL 2.0.3.7 2011.05.28 -
Avast 4.8.1351.0 2011.05.28 -
Avast5 5.0.677.0 2011.05.28 -
AVG 10.0.0.1190 2011.05.28 -
BitDefender 7.2 2011.05.29 -
CAT-QuickHeal 11.00 2011.05.28 -
ClamAV 0.97.0.0 2011.05.28 -
Commtouch 5.3.2.6 2011.05.29 -
Comodo 8873 2011.05.29 -
DrWeb 5.0.2.03300 2011.05.29 -
Emsisoft 5.1.0.5 2011.05.28 -
eSafe 7.0.17.0 2011.05.26 -
eTrust-Vet 36.1.8353 2011.05.27 -
F-Prot 4.6.2.117 2011.05.28 -
F-Secure 9.0.16440.0 2011.05.29 -
Fortinet 4.2.257.0 2011.05.28 -
GData 22 2011.05.29 -
Ikarus T3.1.1.104.0 2011.05.28 -
Jiangmin 13.0.900 2011.05.28 -
K7AntiVirus 9.104.4734 2011.05.28 -
Kaspersky 9.0.0.837 2011.05.29 -
McAfee 5.400.0.1158 2011.05.29 -
McAfee-GW-Edition 2010.1D 2011.05.28 -
Microsoft 1.6903 2011.05.28 -
NOD32 6161 2011.05.29 -
Norman 6.07.07 2011.05.26 -
nProtect 2011-05-28.01 2011.05.28 -
Panda 10.0.3.5 2011.05.28 -
PCTools 7.0.3.5 2011.05.19 -
Prevx 3.0 2011.05.29 -
Rising 23.59.04.03 2011.05.27 -
Sophos 4.65.0 2011.05.29 -
SUPERAntiSpyware 4.40.0.1006 2011.05.28 -
Symantec 20111.1.0.186 2011.05.29 -
TheHacker 6.7.0.1.212 2011.05.28 -
TrendMicro 9.200.0.1012 2011.05.28 -
TrendMicro-HouseCall 9.200.0.1012 2011.05.29 -
VBA32 3.12.16.0 2011.05.27 -
VIPRE 9419 2011.05.29 -
ViRobot 2011.5.28.4484 2011.05.28 -
VirusBuster 13.6.375.2 2011.05.28 -

You must login or register to view this content.
AhnLab-V3 2011.05.29.00 2011.05.28 -
AntiVir 7.11.8.161 2011.05.28 -
Antiy-AVL 2.0.3.7 2011.05.28 -
Avast 4.8.1351.0 2011.05.28 -
Avast5 5.0.677.0 2011.05.28 -
AVG 10.0.0.1190 2011.05.28 -
BitDefender 7.2 2011.05.29 -
CAT-QuickHeal 11.00 2011.05.28 -
ClamAV 0.97.0.0 2011.05.28 -
Commtouch 5.3.2.6 2011.05.29 -
Comodo 8873 2011.05.29 -
DrWeb 5.0.2.03300 2011.05.29 -
eSafe 7.0.17.0 2011.05.26 -
eTrust-Vet 36.1.8353 2011.05.27 -
F-Prot 4.6.2.117 2011.05.28 -
F-Secure 9.0.16440.0 2011.05.29 -
Fortinet 4.2.257.0 2011.05.28 -
GData 22 2011.05.29 -
Ikarus T3.1.1.104.0 2011.05.28 -
Jiangmin 13.0.900 2011.05.28 -
K7AntiVirus 9.104.4734 2011.05.28 -
Kaspersky 9.0.0.837 2011.05.29 -
McAfee 5.400.0.1158 2011.05.29 -
McAfee-GW-Edition 2010.1D 2011.05.28 -
Microsoft 1.6903 2011.05.28 -
NOD32 6161 2011.05.29 -
Norman 6.07.07 2011.05.26 -
nProtect 2011-05-28.01 2011.05.28 -
Panda 10.0.3.5 2011.05.28 -
PCTools 7.0.3.5 2011.05.19 -
Prevx 3.0 2011.05.29 -
Rising 23.59.04.03 2011.05.27 -
Sophos 4.65.0 2011.05.29 -
SUPERAntiSpyware 4.40.0.1006 2011.05.28 -
Symantec 20111.1.0.186 2011.05.29 -
TheHacker 6.7.0.1.212 2011.05.28 -
TrendMicro 9.200.0.1012 2011.05.28 -
TrendMicro-HouseCall 9.200.0.1012 2011.05.29 -
VBA32 3.12.16.0 2011.05.27 -
VIPRE 9419 2011.05.29 -
ViRobot 2011.5.28.4484 2011.05.28 -
VirusBuster 13.6.375.2 2011.05.28 -



Enjoy Cool Man (aka Tustin)
Last edited by <Jimbo> ; 06-01-2011 at 01:32 PM.

The following user groaned <Jimbo> for this awful post:

05-29-2011, 03:27 AM #2
Default Avatar
Cade
Guest
might use this thanks Jimbo123 :carling: its CLJ btw.
05-29-2011, 08:29 AM #3
anddrew
League Champion
This is mine (I already had one)
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>404 - Page Not Found</title>
</head>
<body>
<font size="8"><center>
<p> </p>
<p>ERROR 404</p>
</center></font>
<font size="6"><center>
<p>Page Not Found</p>
</center>
</font>
<center>
<p><font size="5">
<input name="button" type="submit" id="button" onclick="history.back()" value="Click To Go Back" />
</form>
</font></p>
<font size="2"><center>
<p>or</p>
<p>
<input type="button" value="Click For First Page" onClick="window.location='https://website main page' "></p>
</center></font>
</center></font>
</center>
</body>
</html>
Very simple but is effective.
[ATTACH=CONFIG]9588[/ATTACH]
05-29-2011, 02:17 PM #4
<Jimbo>
</Jimbo>
Cool bro Smile I updated it just incase you wanted it (I'm bored) - Basically validated :p

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>404 - Page Not Found</title>
<meta name="author" content="Jimbo" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<style type="text/css">
h1 {
font-size:50px;
text-align:center;
}
h2 {
font-size:30px;
text-align:center;
}
p {
text-align:center;
}
</style>
</head>
<body>
<h1>ERROR 404</h1>
<h2>Page Not Found</h2>
<p><button onclick="history.back()">Click To Go Back</button></p>
<p>or <br />
<button onclick="window.location='https://website main page'">Click For First Page</button></p>
</body>

</html>


Cool Man (aka Tustin)

Originally posted by anddrew View Post
This is mine (I already had one)
[ATTACH=CONFIG]9588[/ATTACH]

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo