Welcome, Guest

Please login or register

TUTORIALS SUBMENU

PHOTOSHOP    FLASH    ILLUSTRATOR    BLENDER    CINEMA 4D    WEB-CODING    [SUBMIT]

Sponsored Links

Custom Error Messages


It is a fact of life that if you run a busy regularly-updated website you'll also move your files about quite often. Whilst this may not pose a problem for you initially, search engines take a while to process dead links, and during this time you may be losing visitors who go to your old pages and get the standard 'page not found' error. You can prevent this by customizing your error pages, sending your visitors instead to a nice formatted webpage that politely tells them to keep on looking using your new navigation structure.   There are two ways to do this...

Apache Configuration
If you are lucky enough to have a decent web hosting service that gives you access to Apache's httpd.conf file, you can set up custom error messages in a matter of moments.  Just open up the file in your favourite text editor, search for ErrorDocument 404, uncomment out the line, and add the URL to the file on your website containing the error message.   You should end up with a line looking something like this:

ErrorDocument 404 http://www.yourdomain.com/404error.htm

Now save your changes, upload the amended file, and restart Apache.  If all goes well, you'll now be redirected to your error page if you enter in an incorrect URL on your server.    If you have IIS or any other webserver, access your documentation for details on how you do this for your service.

.htaccess Configuration
Even if you don't have direct access to the Apache configuration files, all is not lost. A virtually identical effect can be achieved using local .htaccess files.   Just use your favourite text editor to create a file called .htaccess (if you use notepad, beware it doesn't add a .txt extension onto the end) that contains the following code:

ErrorDocument 404 http://www.yourdomain.com/404error.htm

Notice anything familiar? :)  Now upload the file to the main directory of your website, or the specific subdirectory you want to protect.  Remember that the settings in this file will affect any directory you put it into and all subdirectories branching off from it, but not any parent directories.  Also make sure you upload this file in ASCII and not binary, and CHMOD it to 644 or you'll run into problems. If you don't know how to CHMOD, just download a decent FTP program like CuteFTP, right click on the file, and select 'change file attributes' or somesuch - that does the same (essentially it just allows the file to be readable by the server but not by any joe public with a browser).   And that it!  No reset is needed, so you should be able to see your changes immediately.

Other Configurable Errors
Although 404 (page not found) errors are by far the most common ones you will see on the internet, there are quite a few others that can be handled using exactly the same methods detailed above. Just in case you ever wanted to know, they are...
 

Client Side Errors Server Side Errors
400 Bad syntax
401 Unauthorized
402 Not Used
403 Forbidden
404 Not Found
500 Internal Error
501 Not Implemented
502 Overloaded
503 Gateway Timeout

- Tutorial written by Man1c M0g

Automatic Translations: Translate Into French Translate Into German Translate Into Italian Translate Into Spanish Translate Into Portuguese

Last 5 User Comments

User:  robin746 (#27064)
Date: Tue May 02, 2006. 21:24:20

Post #1 of 1

Glad you mentioned the other error codes, as people seem to do 404 and then stop there.

For loads of fun, visit [link] to see how creative people have gotten with their pages. Hours of fun!

Reply to this post


--- View Entire Thread ---
Amazing Font Pack!

Featured Tutorialsmore

Quick Sunsets
Quick Sunsets
- Adobe Photoshop -
Realistic Fog & Mist
Realistic Fog & Mist
- Adobe Photoshop -
Fire Effects
Fire Effects
- Adobe Photoshop -
Simple Tiling Patt...
Simple Tiling Patt...
- Adobe Photoshop -
Membership

Username:
Password:  
Remember Me

Lost Password? || Register

Advertisements





Special Options
Printer Friendly Version
Forum Threads

 Re: 3ds Max Tutorials for Beginners
Author: 3DSMaxresources
Posted: Feb 22nd, 4:29pm
Activity: 0 replies, 721 views
Delete Account
Author: Neo824
Posted: Oct 18th, 7:47am
Activity: 1 replies, 1841 views
Back...
Author: unleash
Posted: Jul 02nd, 12:37pm
Activity: 2 replies, 1937 views
Help Please :)
Author: Roosta
Posted: Mar 25th, 5:08am
Activity: 0 replies, 2387 views
thank you
Author: HypepapyHer
Posted: Mar 24th, 9:18pm
Activity: 1 replies, 1744 views
 Deactivate Account
Author: jerinian
Posted: Oct 02nd, 12:16pm
Activity: 1 replies, 2505 views
 changes....
Author: supertackyman
Posted: Sep 12th, 3:56am
Activity: 2 replies, 3423 views
Back again and with free webhosting :)
Author: ngz
Posted: Aug 14th, 4:50pm
Activity: 0 replies, 2664 views
Cartoon Crab 6 Legs Walk Run created in Blender
Author: patricia3d
Posted: Jun 19th, 1:58pm
Activity: 0 replies, 4033 views
HTML Form Post Array to PHP
Author: Space Cowboy
Posted: May 25th, 3:18pm
Activity: 1 replies, 3797 views
My blog where i create Digi Scrapbook
Author: claudya07
Posted: May 11th, 3:33pm
Activity: 0 replies, 17058 views
Blood Dripping from Letters
Author: patricia3d
Posted: Apr 05th, 4:37am
Activity: 0 replies, 4925 views
Forum Threads

--- Site Resources ---
Total Tutorials:212
Total Downloads:    441
Total Fonts:    4669