Publishing System Settings Logout Login Register
Everything you need to know about .htaccess! Massive tutorial!
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on November 22nd, 2006
8408 views
General Website Development
Custom Error Pages

Theres not much to this either. You can use this if you want to use custom pages instead of the boring old default ones.

First of all, there are 5 common types of errors. Not ALL errors are listed.

400 - Bad Request
401 - Authorization Required
403 - Forbidden
404 - Wrong Page
500 - Internal Server Error

Before you insert the .htaccess code, you need to create the error files. These can be anything you choose, and just upload them to your website.

Here is the code you will need

ErrorDocument 400 http://www.yoursite.com/400.html
ErrorDocument 401 http://www.yoursite.com/401.html
ErrorDocument 403 http://www.yoursite.com/403.html
ErrorDocument 404 http://www.yoursite.com/404.html
ErrorDocument 500 http://www.yoursite.com/500.html


ErrorDocument -  tells the server that you are defining an error page,

- Then the number indicating the error number

- Finally the destination of the custom error page.

You do not need all of these. but I have supplied the code for all of them.

You can just define a custom 404 page, or just a 403 page. or a 404 & a 403.. you get the idea.

 

Next Page
Pages: 1 2 3 4 5 6 7 8 9 10
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
Adam

This author is too busy writing tutorials instead of writing a personal profile!
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top