Jump to main contentmickwood.com - Website Hosting & Design for Christian Organisations
welcome

Creating Custom Error Pages

Step 1: Open up a text editor (Notepad is fine) and create a file called .htaccess - (I know it's strange but is really is called .htaccess).

Type in the following code (Watch the word wrap - each error document and URL should be on one line):

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

Remember to replace www.yoursite.com with the name of your site.

Step 2: Upload your .htaccess file into your main web directory where your index.html file is located. It is a hidden file so it will disappear.

Step 3: Create a directory named "errors" in your web directory.

Step 4: Create some custome error pages and name them accordingly.

Step 5: Upload (FTP) your custom error pages into your errors folder. Name them according to their error:

400.html - Bad Request
401.html - Authorisation Required
403.html - Forbidden Error
404.html - File Not Found Error
500.html - Internal Server Error

You do not need to use or create all of the error documents if you don't want to - alter your .htaccess file accordingly.

That's it!

Take a look at the mickwood.com error pages. Notice that they are shtml files rather than html but that's because they have a Server Side Include.

mickwood.com's 400.shtml error page
mickwood.com's 401.shtml error page
mickwood.com's 403.shtml error page
mickwood.com's 404.shtml error page
mickwood.com's 500.shtml error page

Back to Article Index

Tutorial Index


Resources

Dreamweaver Tutorials

Dreamweaver FAQ

Dreamweaver MX Zone

The Patty Site


welcome | name | hosting | design | content | promote | update | showcase | support
about us | general | articles | accessibility | sitemap | enquiries | feedback | training | consultancy

Welcome Showcase Support Update Promote Content Design Hosting Name