Print, video, sounds

Make custom error pages for Dreamhost

Putting four HTML files in your home directory
makes custom error pages with DreamHost.
pdf version
DreamHost-error-pages.gif
The Dreamhost web hosting company lets you put specially-named files in the root, or home directory of your website. These pages will show anytime you get a server or 404 page not found error.

The more I use Dreamhost the more I like them. Unlike 1&1, my Movable Type websites won't generate a 500 internal server error when I go to publish a page. I am told that is becasue Dreamhost does not starve the servers for resources. Cloud this, virtualize that, it all comes down to screwing customers and being cheap. So I mis-typed a web page for my site and I got the usual generic 404 error page that webhosts put up. The clowns at 1&1 were so venal and piggish they would put
advertisements in their 404 page. The elitiest English pigs at 1&1 put all their ads under a big 1&1 banner. Just what you need to confuse and piss off someone that is already pissed off because she got a broken link.

Unlike the elitist English pigs at 1&1, the Dreamhost folks just put up a simple generic page saying you got a 404 error. The Dreamhost page does not even have a Dreamhost logo or anything to tell you who the host is. But there is a little note under the error that says you can put in specially named files in your home directory and then the a 404 error will go to that page instead of the generic Dreamhost 404 page.
Bottom of first columnmove down to the left

So rather delighted at this simple way to improve the professionalism of my site, I immediately used the New Page function in the top-level of Movable Type to create the four error pages.

Error What it means File name
Error 401 Failed Authorization failed_auth.html
Error 403 Forbidden forbidden.html
Error 404 File Not Found missing.html
Error 500 Internal Server Error internal_error.html

So the pages I created are here:

Failed Authorization

I imagined a nice image would be foreboding boarder crossing. So I used Google Images to find a nice Burmese border and added that to the page.

failed_auth.jpg



move up a little to the right move down to the left

Forbidden

For this one I got another image from Google Images, a woman holding her hand up as if she was saying "Stop".

forbidden.jpg












The page or file is missing.

I got a little more "AP style guide" on that one, makeing a complete sentence. For some reason I felt a dog falling was the right image so I found a Jim-dandy one on Google Images.
missing.jpg

move up a little to the right move down to the left

The web server had an internal server error.

Internal_server_error_500.jpgAnother complete sentence as title. For this I can't even remember how I found a schwacked image of a Gumby-like hand-fashioned figurine, not quite as nice as Twigman in the movie Tropic Thunder, but nice nevertheless.

As usual there was plenty of software suffering. When I went to my table of contents the CSS style guide was gone since it looked like crap. Stupid me, I had two stylesheets that wrote to rako.com/Contents.css. So I went into the Movable Type Design Templates, restored the stylesheet for the table of contents to the previous state by copying from my backup. Then I pointed the original default stylesheet to the home or root directly and called it Stylesheet.css. Now the error pages has the clean generic Movable Type default look while the table of contents is all fancy pants. In creating the error pages I first gave them the exact html names, failed_auth, forbidden, missing, internal_error. That way the default page template file created the proper file names for the Dreamhost scheme to work. But then I realized the great Movable Type lets you edit the Basename so I could have complete sentences as the title of the page and the bold heading, but still have the output html file have the right name. Another way to accomplish the same thing is give the page the exact right name, such as failed_auth, publish it once, and then you can change title and the great Movable Type 5.0OS is smart enough to not change the file name even though it was originally linked to the page name.
move up a little to the right move down to the left

This post is in these categories:

border bar
Bottom of first column This is the end.