TinyPortal

General => Chit chat => Topic started by: Zetan on April 07, 2007, 05:53:47 PM

Title: Custom Error Pages!
Post by: Zetan on April 07, 2007, 05:53:47 PM
So, you are browsing the net and you have a lot of tabs open. You click on a link that brings you to a 404 Error page!

Chances are you'll leave, never to return. Maybe you'll play with the URL a bit to see if something interesting happens.

Not every internet user is an expert, so we need to give those people a little help.
It also helps your site if you have custom Error Pages. You can provide links back to your homepage and guide the person. It also helps if you explain why they have reached an Error Page.. If they see a plain white 404 error.. you might have just lost a valuable customer/passer by/new member.


Heres ours:
http://labradio.co.uk/404/
It has search, home page link, recent topics and stats.. it give the person options. We obvioulsy don't have a page or file called 404 that can be browsed.


Most website Admin have a cPanel, and we have the option to customise our error pages.


See this site which I found:
http://www.plinko.net/404/default.asp

And this page has links to website error pages for examples:
http://www.plinko.net/404/area404.asp

I've never had so much fun looking at error pages :)
Title: Re: Custom Error Pages!
Post by: lish425 on April 07, 2007, 10:34:25 PM
I tried to make one just now I think it needs some work though, lol.
Title: Re: Custom Error Pages!
Post by: Zetan on April 17, 2007, 09:10:42 AM
Hmmmm... looks great lish425  ::)
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 10:26:59 AM
I need one, with some added php tricks -- ever see that 'ani-404 Peg-leg'..very cool
Title: Re: Custom Error Pages!
Post by: Zetan on April 17, 2007, 11:42:15 AM
Quote from: crip~ on April 17, 2007, 10:26:59 AM
ever see that 'ani-404 Peg-leg'..very cool

ummmm... can't say I have tbh  ???
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 12:01:56 PM
i'll see if i can find it..
Title: Re: Custom Error Pages!
Post by: Zetan on April 17, 2007, 12:06:04 PM
sweet  8)
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 12:10:31 PM
http://www.homestarrunner.com/systemisdown.html
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 12:14:31 PM
Few more..lol..
http://www.404-error-page.com/404-some-fun-404-error-page-spoofs.shtml
Title: Re: Custom Error Pages!
Post by: Zetan on April 17, 2007, 12:22:17 PM
Cool... does the first link have Flash embedded?
I can't view flash at work as it's blocked  :-\
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 01:18:19 PM
.swf file, so yes.
Title: Re: Custom Error Pages!
Post by: keith021773 on April 17, 2007, 02:44:39 PM
I have tried to make one..   But no luck.    My old host offered a service in cpanel where you could make them.   I have since moved to a new better host but they don't offer this..   

I'm gonna need a "newbie How-To" to get one for me.   LOL
Title: Re: Custom Error Pages!
Post by: Zetan on April 17, 2007, 03:53:57 PM
Hi, I've just had a quick googla and found this:
http://www.thesitewizard.com/archive/custom404.shtml

QuoteRequirements for Customizing the 404 File Not Found Page


It is not possible to customize your 404 error page if your web host has not enabled this
facility for your website. For example, at the time of this writing, if you host at
Geocities or Tripod, you would not be able to customize your 404 Error Page.



If your web host has this facility, you will usually find mention of this somewhere in
their documentation. In fact, if they mention somewhere that you can customize
a file named ".htaccess", it probably means that you can also customize your
404 File Not Found error page.

The link above explains more.
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 04:07:41 PM
Here is a little tut do-it-yourself 404 page -
- if you follow these simple steps you too can have your own custom 404 error page!!

Title: Re: Custom Error Pages!
Post by: Zetan on April 17, 2007, 04:13:08 PM
crip~, does the example you posted work if the host has not enabled users to edit their error page?
On the site I found, they say it's not possible... I'm interested to see if there is a way to do it.
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 04:20:20 PM
Yes it works via your .htaccess file -- delete the custom 404 page your host provided you and make your own!
Title: Re: Custom Error Pages!
Post by: Crip on April 17, 2007, 04:21:57 PM
I'll make one up and show you it works.
Title: Re: Custom Error Pages!
Post by: Zetan on April 17, 2007, 04:22:46 PM
Nice one..  :up:

I've just read the page I linked, it mentions it near the bottom  :uglystupid2:
Title: Re: Custom Error Pages!
Post by: brianjw on April 20, 2007, 01:18:52 AM
http://www.homestarrunner.com/systemisdown.html
that is awesome crip lol thanks for sharing
Title: Re: Custom Error Pages!
Post by: Thurnok on April 20, 2007, 03:13:36 AM
Quote from: Zetan on April 17, 2007, 04:13:08 PM
crip~, does the example you posted work if the host has not enabled users to edit their error page?
On the site I found, they say it's not possible... I'm interested to see if there is a way to do it.

If your host tells you that you cannot do it, it is most likely because they do not set AllowOverride for FileInfo or they might even have AllowOverride set to None.

AllowOverride is a directive that is set in the httpd.conf file and determines what (if any) settings can be overridden (modified) by the .htaccess file.  If AllowOverride FileInfo is not set, then you cannot set ErrorDocument among other file functions in the .htaccess file.  If AllowOverride is set to None, the .htaccess file has no effect whatsoever for anything, in fact it is not even read by the HTTP Daemon during GET/POST requests at all in this case.

So in answer to your question Zetan, your Host provider can indeed prevent you from using your own Error documents.
Title: Re: Custom Error Pages!
Post by: Zetan on April 20, 2007, 09:55:50 PM
Thanks for clearing that up Thurnok.
Title: Re: Custom Error Pages!
Post by: Crip on April 28, 2007, 11:16:08 PM
@ Zetan --
this is a non exitant page to my website, go there and you will see my custom 404 page via .htaccess file the way i explained earlier -- http://www.cripcan.com/tools.htm --or make up one yourself... ;)
Title: Re: Custom Error Pages!
Post by: Zetan on April 29, 2007, 10:00:20 AM
Thanks crip... I'm not actually in need of one as I can customise my 404. I was really just trying to find a work around for those people that don't have the option to.
Heres mine:
http://labradio.co.uk/buggerwrongpage
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 10:13:13 AM
hey cool, that has php in it..How did you make it..(whats inside) Reffering url: IP: all that stuff is cool.I want one like that.

tell me, share ??
Title: Re: Custom Error Pages!
Post by: Zetan on April 29, 2007, 10:32:38 AM
Sure I'll share... some of the .php are inserted server side via the cPanel options:
<li>Refering URL:
<!--#echo var="HTTP_REFERER" --></li>

<li>Requested URL:
http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --></li>


<li>Visitors IP address:
<!--#echo var="REMOTE_ADDR" --></li>
<li>Visitors Browser:<br>
<!--#echo var="HTTP_USER_AGENT" --></li>


<li>Redirect Status:
<!--#echo var="REDIRECT_STATUS" --></li>

If you have the option to insert those in cPanel.



At the top are parts of my sites style sheet .css pulled in to the page to help keep the theme of the site together with the background and block headers:
<?php require("/home/zetan1/public_html/SSI.php"); ?>
<center><title>Error 400</title>
<link rel="stylesheet" type="text/css" href="http://labradio.co.uk/Themes/azure_Silver_test/style.css" />
</head>
<body style="margin: 1ex;">
<table width="485" cellpadding="5" cellspacing="0" border="0" bordercolor="#333333">
<tr border="0">

<img src="http://i31.photobucket.com/albums/c399/LabDesign4632/LABRadioBannerOrangeMonocopy.gif"></tr>
<tr class="titlebg"><td align="left" class="windowbg"><b1><font color="#ADFF2F">[<a href="http://labradio.co.uk/index.php">Home</a>][<a href="mailto:contact@labradio.co.uk">Contact</a>]<div align="center"><font color="#ff0000">Error 400 :: Bad Request.</font><center></td></tr>
</div>


A sprinkle of SMF search engine:
<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->

A few HTML links for the Home and Contact, and this is my complete .404:
<?php require("/home/zetan1/public_html/SSI.php"); ?>
<center><title>Error 400</title>
<link rel="stylesheet" type="text/css" href="http://labradio.co.uk/Themes/azure_Silver_test/style.css" />
</head>
<body style="margin: 1ex;">
<table width="485" cellpadding="5" cellspacing="0" border="0" bordercolor="#333333">
<tr border="0">

<img src="http://i31.photobucket.com/albums/c399/LabDesign4632/LABRadioBannerOrangeMonocopy.gif"></tr>
<tr class="titlebg"><td align="left" class="windowbg"><b1><font color="#ADFF2F">[<a href="http://labradio.co.uk/index.php">Home</a>][<a href="mailto:contact@labradio.co.uk">Contact</a>]<div align="center"><font color="#ff0000">Error 400 :: Bad Request.</font><center></td></tr>
</div>
<br>




<td>
<div align="left"><b1><font color="#ff0000">Error 400</font></b1></div>

<br>
<strong>Introduction</strong>
<br><br>
    Your Web server thinks that the data stream sent by the client (e.g. your Web browser or our CheckUpDown robot) was 'malformed' i.e. did not respect the HTTP protocol completely. So your Web server was unable to understand the request and process it.
<br><br>
    It almost always means bad programming of the client system and/or your Web server.
<br><br>
<strong>400 errors in the HTTP cycle</strong>
<br><br>
    Any client (e.g. your Web browser or our CheckUpDown robot) goes through the following cycle:
<br><br>
        <li>Obtain an IP address from the IP name of your site (your site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNSs).</li>
        <li>Open an IP socket connection to that IP address.</li>
        <li>Write an HTTP data stream through that socket.</li>
        <li>Receive an HTTP data stream back from your Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.</li>
<br><br>
    This error occurs in the final step above when the client receives an HTTP status code it recognises as '400'.
<br><br>
<strong>Resolving 400 errors - general</strong>
<br><br>
    There is a low-level program bug in the client or the Web server or both. If you do not have access to the source code for these systems, the only thing you can do is refer the problem to technical support people at the companies that developed the systems.
<br><br>
<strong>Resolving 400 errors - CheckUpDown</strong>
<br><br>
    You should never see this error at all when you use our CheckUpDown service. It indicates that the two systems (our robot and your Web server) fundamentally disagree on the syntax of HTTP data streams.
<br><br>
    Please contact us directly (email preferred) whenever you encounter 400 errors. Only we can resolve them for you. Unfortunately this may take some time, because we have to analyse the underlying HTTP data streams and may have to liaise with your ISP and the vendor of your Web server software to agree the exact source of the error.
<br><br>

Thank you for visiting.
<br>
<br>
<hr>
<br>
<li>Refering URL:
<!--#echo var="HTTP_REFERER" --></li>

<li>Requested URL:
http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --></li>


<li>Visitors IP address:
<!--#echo var="REMOTE_ADDR" --></li>
<li>Visitors Browser:<br>
<!--#echo var="HTTP_USER_AGENT" --></li>


<li>Redirect Status:
<!--#echo var="REDIRECT_STATUS" --></li>
<div align="right">
<img src="http://labradio.co.uk/Themes/azure_Silver_test/images/ip.gif"> Logged.</div>
<tr>

<td align="left" class="windowbg"><b1><font color="#ADFF2F">
Search:</font></b1><br>
<center>
<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->
</td></tr>
</td>
</table>

<!--#echo var="HTTP_HOST" -->
</center>


feel free to adapt into you're own words.
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 10:37:23 AM
Thanks Z.. :coolsmiley:
i used to have that, but different hoster now..

...adding it now!!!

C
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 10:38:49 AM
my cPanel sux...............
Title: Re: Custom Error Pages!
Post by: Zetan on April 29, 2007, 10:49:42 AM
Quote from: crip~ on April 29, 2007, 10:38:49 AM
my cPanel sux...............

:-\
My host is pretty good, the cPanel is feature rich, Fantastico, free Shoutcast up to 96kbps 16 listeners which we use in addition to our main stream host at Stream Solutions. excellent stats page.
If anybody is interested:

Evo Hosting (http://www.evohosting.co.uk/affiliate/idevaffiliate.php?id=189_0_1_4)
Title: Re: Custom Error Pages!
Post by: Zetan on April 29, 2007, 10:56:19 AM
Apologies, the code I posted is from my 400 error page.

Here is the 404, they are similar but the 400 has a lot more waffle:

<?php require("/home/zetan1/public_html/SSI.php"); ?>
<center><title>Error 404</title>
<link rel="stylesheet" type="text/css" href="http://labradio.co.uk/Themes/azure_Silver_test/style.css" />
</head>
<body style="margin: 1ex;">
<table width="485" cellpadding="5" cellspacing="0" border="0" bordercolor="#333333">
<tr border="0">

<img src="http://i31.photobucket.com/albums/c399/LabDesign4632/LABRadioBannerOrangeMonocopy.gif"></tr>
<tr class="titlebg"><td align="left" class="windowbg"><b1><font color="#ADFF2F">[<a href="http://labradio.co.uk/index.php">Home</a>][<a href="mailto:contact@labradio.co.uk">Contact</a>]<div align="center"><font color="#ff0000">HTTP Error 404 :: Wrong Page.</font><center></td></tr>
</div>
<br>




<td>
<div align="left"><b1><font color="#ff0000">Error 404</font></b1></div>

<br>
Sorry, we have lost that page!
We can't find that page at the moment or it might have been moved.<br>
It could be a problem with the site, or you may have followed a dodgy link.<br><br>

If you are sure it should exist, or if you are getting this page a lot at
the moment, it might be that we've broken the site, and the worker monkeys should be busy fixing it now. <br><br>

Check back later and see if it's working.
If it's just a dodgy link, could you be nice and let someone know their link isn't working? If it's us, we'll crack open some more coffee and get on to it as soon as we can.<br><br>

Hopefully, even though you've ended up here, you'll want to browse around the rest of the site.
<br><br>

Thank you for visiting.
<br>
<br>
<hr>
<br>
<li>Refering URL:
<!--#echo var="HTTP_REFERER" --></li>

<li>Requested URL:
http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --></li>


<li>Visitors IP address:
<!--#echo var="REMOTE_ADDR" --></li>
<li>Visitors Browser:<br>
<!--#echo var="HTTP_USER_AGENT" --></li>


<li>Redirect Status:
<!--#echo var="REDIRECT_STATUS" --></li>
<div align="right">
<img src="http://labradio.co.uk/Themes/azure_Silver_test/images/ip.gif"> Logged.</div>
<tr>

<td align="left" class="windowbg"><b1><font color="#ADFF2F">
Search:</font></b1><br>
<center>
<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->
</td></tr>
</td>
</table>

<!--#echo var="HTTP_HOST" -->
</center>
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 11:14:47 AM
noted.
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 11:17:05 AM
that site would make a killer TP_Theme :D
http://www.evohosting.co.uk/index.php
Title: Re: Custom Error Pages!
Post by: Zetan on April 29, 2007, 11:35:23 AM
I was thinking the same when I first see it... best ask first ;)
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 11:50:21 AM
just duplicate what we see -- use our own img's, it can be done!
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 11:52:04 AM
looks like phpNuke, or phpBB...
Title: Re: Custom Error Pages!
Post by: Zetan on April 29, 2007, 12:20:34 PM
Quote from: crip~ on April 29, 2007, 11:50:21 AM
just duplicate what we see -- use our own img's, it can be done!

Sweet.. Well, you guys are the themers  :coolsmiley:
I'll add it to my themes for sure.
Title: Re: Custom Error Pages!
Post by: Ken. on April 29, 2007, 01:28:38 PM
BTW, this a little OT but...

Really like the new layout & design on your site Jeff, it looks great.  :up:
Title: Re: Custom Error Pages!
Post by: Crip on April 29, 2007, 01:31:25 PM
Ken,
you mean the Dirtylicious Theme? :)
Title: Re: Custom Error Pages!
Post by: Ken. on April 29, 2007, 02:59:09 PM
Quote from: crip~ on April 29, 2007, 01:31:25 PM
Ken,
you mean the Dirtylicious Theme? :)

Nope... it's nice, but I was referring to This One (http://cripcan.com/)