vBulletin

Thank you for visiting. This is our website archive. Please visit our main website by clicking the banner above.
vBulletin FAQ is dedicated to helping the forum owner build, manage and profit from his vBulletin Forum
vBulletin Web Hosting - Free skins and styles for your vBulletin - Search Engine Optimization




Custom Error Pages

noppid
02-27-2005, 04:33 PM
These are the error pages an internet surfer may encounter at your site if they get lost, follow a bad link, or get sent to a page that has moved or been removed. "You can create custom error pages to display when a user enters a wrong URL, an outdated URL or when the user is not authorized to access a specific directory of your web space."

The following may convert a lost soul into a valuable member!

There are five error pages your can control if your site is hosted on a cpanel server. There are other ways to do this outside the cpanel control panel, but this discussion will cover the steps to use cpanel menus that help create the SHTML pages for your custom error pages.

Possible Errors (available in the menu)

400 (Bad request)
401 (Authorization required)
403 (Forbidden)
404 (Wrong page)
500 (Internal server error)


Let's do the 404 page for example. From the cpanel main menu, click "Error Pages". Then click the 404 image on the next page and you will get an editor page with buttons at the top. You create your base page here. (After base creation, you can download the files and dress them up to look like and tell about your site.)

The buttons insert the SHTML code to display certain server generated information about what went wrong. You can select...


Referring URL
Visitors IP Address
Requested URL
Server Name
Visitor's Browser
Redirect Status Code


You should at a minimun display the Requested URL and the Redirect Status. The status code would be the 404 is this example since we are editing the 404 error page.

After you have inserted your SHTML code, save the file at the bottom of the form.

The point of the error page is to let the user know went wrong. Then the more important part, the point of this article, let them know where they are and what is available to them and how to get to it.

Now download the pages you have created from your web site's root folder. 404.shtml for example and edit them.

Use CSS that makes the page look like your site. Describe your site and provide links to the main site. The more the user learns from this page, the less likely they are to hit the back button. Draw them in by making them comfortable. A plain old white default IE error page tells the user nothing and apache error pages are intimadating. Don't scare a potential member off!

It's your house, when someone visits, even if they come in the wrong door, make them feel at home and get them to the right place on your site to continue their browsing.

Keep lost or misdirected visitors away from the back button!

Here is an example... http://www.riderinfo.com/404.shtml

Copyright noppid @ www.lakecs.com

Joeychgo
02-27-2005, 06:46 PM
Very Very good.

SiteTutor
03-09-2005, 07:21 PM
indeed it is :)

Joeychgo
03-09-2005, 09:42 PM
Its a good way to retain traffic you might otherwise lose.

XTreme
03-13-2005, 03:32 AM
yes, thanks for the tip, i have been working on error pages for my site

theMusicMan
03-13-2005, 05:35 AM
Great advice there Greg. I must add this to my ever expanding to-do list!!

noppid
03-13-2005, 09:42 AM
Great advice there Greg. I must add this to my ever expanding to-do list!!

Thanks, seems whenever I get one thing off the list, Joe points me to 3 more. Good luck catching up.

theMusicMan
03-13-2005, 11:25 AM
Can someone please explain the difference between html and shtml... thanks!

Can I create any content in html for these pages?

noppid
03-13-2005, 11:41 AM
Can someone please explain the difference between html and shtml... thanks!

Can I create any content in html for these pages?

You do everything like it's an HTML page and vaidate it.

Adding the S for SHTML makes the server parse comments with keywords in them, like variables, they contain data.

Create the page through the interface to get the SHTML tags for the server info you want to display. For instance, here is the code I use to display the requested URL on a 404 page...


<b>Page Requested Not Found!</b> <br /><br />
[ <!--#echo var="REQUEST_URI" --> ]


<!--#echo var="REQUEST_URI" --> is the SHTML that the server parses to a value it has. It validates as HTML because it appears to be a comment.

So create the default pages in cpanel which will contain those tags of information and put html around them to describe them and make them understandable.

Here's my entire 404.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title>
RiderInfo.com - Motorcycle Forums
</title>
<!-- CSS Stylesheet -->
<style type="text/css">
<!--
/* vBulletin 3 CSS For Style 'Black' (styleid: 2) */
body
{
background: #000000 url(http://www.riderinfo.com/forums/images/black/bg02.gif);
color: #FFFFFF;
font: 14pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
margin: 5px 5px 10px 5px;
}
a:link
{
color: #FF9900;
}
a:visited
{
color: #FF9900;
}
a:hover, a:active
{
color: #FFFFFF;
}
-->
</style>

<!-- / CSS Stylesheet -->
</head>
<body>
<a href="http://www.riderinfo.com/" ><img src="http://www.riderinfo.com/riderinfo3.gif" alt="Visit RiderInfo.com" border="0" /></a><br /><br />
<h1>Motorcycle Disscussion Forums</h1>
<br />
<div>This <a href="http://www.riderinfo.com/" >motorcycle forum</a> is for bikers to discuss bikes, rides, destinations, gear, travel arrangements, tattoos and more! Anyone may <a href="http://www.riderinfo.com/forums/register.php" >Join</a>. Membership is FREE!</div>
<br /><br />
<b>Page Requested Not Found!</b> <br /><br />
[ <!--#echo var="REQUEST_URI" --> ]
<br /><br /><br />
Perhaps this page has moved.<br />
Please visit RiderInfo.com <a href="http://www.riderinfo.com/">Motorcycle Forums</a> and try a search for the information you requested.<br /><br />

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



<!--

-->
</body></html>

theMusicMan
03-13-2005, 12:42 PM
... and though not completed yet; here's mine:)

www.themouthpiece.com/404.shtml (http://www.themouthpiece.com/404.shtml)

Thanks for the pointers Greg... much appreciated sir. Hope you don't mind my using your code as an example whilst I figure out how to get mine look the way I want it to.

noppid
03-13-2005, 12:56 PM
... and though not completed yet; here's mine:)

www.themouthpiece.com/404.shtml (http://www.themouthpiece.com/404.shtml)

Thanks for the pointers Greg... much appreciated sir. Hope you don't mind my using your code as an example whilst I figure out how to get mine look the way I want it to.

If I post it, it's free to use. You're welcome.

That looks awsome. I have to table my text.

Joeychgo
03-13-2005, 01:37 PM
The one thing about TheMouthPiece --- I always thought it would be a great domain for lawyers.


Wonder if shiester.com is available?

theMusicMan
03-13-2005, 02:02 PM
Hehe... cracking domain name that one Joey!!!!

And: re theMouthPiece.com domain name; to be honest, when I set the forum up in Nov 2002 I couldn't believe my luck when I found the domain was available... grabbed it straight away.

minstrel
06-02-2005, 08:41 PM
Nice article, noppid.

One addition I'd suggest is a site search.

See sample at http://www.psychlinks.ca/error.htm

noppid
06-02-2005, 10:04 PM
Nice article, noppid.

One addition I'd suggest is a site search.

See sample at http://www.psychlinks.ca/error.htm

Very nice addition, you do nice work. :)

minstrel
06-02-2005, 10:15 PM
Thanks, noppid. But when it comes to anything complicated like PHP and javascript, I'm barely literate :eek:

That's why you get the big bucks :D

noppid
06-02-2005, 10:31 PM
Thanks, noppid. But when it comes to anything complicated like PHP and javascript, I'm barely literate :eek:

That's why you get the big bucks :D

Well, there is income, but I'm no Trump for sure. The customers I work with do appreciate the effort involved in a "quick hack" or mod though.

My free work hopefully will get attention and make a statement one day.

minstrel
06-02-2005, 10:35 PM
I think there's a lot of truth in that.

Show that you are willing to give to the global village what you can and it helps people to see you as someone who isn't just about making a fast buck.

The trick is to find a balance between what you do for free/the love of it and what you do to create an income. Sometimes, it takes a bit of time to find that balance...

Big Kahuna
06-30-2005, 04:20 PM
Mine are a little more basic


http://www.thecybermuseum.com/ooops
http://www.moparstyle.com/ooops
http://www.bigredram.com/oops
http://www.moparstyleracing.com/oops
http://www.magnumgt.com/oops
http://www.daveschultz.com/oops
http://www.ddsenterprise.com/oops

Scribbller
07-05-2005, 10:43 AM
This can also be done through .htaccess file (the method I personally prefer).

noppid
07-05-2005, 10:54 AM
This can also be done through .htaccess file (the method I personally prefer).


How about an example?

Big Kahuna
07-05-2005, 11:29 AM
and the benefit being....?

noppid
07-05-2005, 11:32 AM
and the benefit being....?

That's kinda where I'm going. I've seen more cons then pros to that approach. But hey, there's always a new idea we may want to hear. :)

Scribbller
07-05-2005, 06:08 PM
Its pretty simple actually, the reason I prefer it is because I like working through .htaccess file all you have to do is put the line below in your .htaccess file with the relative path to the custom error page on your server and change the error number

ErrorDocument 404 /errorpages/400.html
ErrorDocument 500 /errorpages/500.html

and so on...

Big Kahuna
07-05-2005, 08:18 PM
That one floated over the top of my head. I need more data to analyze!

Scribbller
07-06-2005, 02:39 AM
That one floated over the top of my head. I need more data to analyze!

Well do you know how to create a .htaccess file if yes create it and upload it in your public_html directory now create an html page 400.html and upload it either in the root directory or any folder, once you have done that edit your .htaccess file and put the 400 error line I mentioned in my last post.

ErrorDocument 400 /errorpages/400.html


vBulletin

seo book

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum