Creating Custom Error Pages
If ever I get an error on my site I get a boring message from my server, with an extra reminder: additionally, no 404 page was found. I thought it was high time I learned about doing this for my site so I spent a couple of hours reading tutorials and viewing some of the funnier 404 error pages by entering my search string in Google: create custom error page. There's plenty of explanations on the web of how this is done.
Basically, error pages are html pages like any other. Save the files with an shtml extension so they remain secure. The important thing to remember is to add a line to your .htaccess file to tell the browser where this file is located.
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
View the source code of my error pages and you'll see how easily they can be created.
http://www.bestoday.com.au/401.shtml
http://www.bestoday.com.au/403.shtml
http://www.bestoday.com.au/404.shtml
So far I have only done this on Toni's Corner of the World. My goal will be to add these error pages to all my weblogs, so they are integrated with the site.



Leave a comment