A Nice 404 Handler For Apache and Movable Type

By default, Movable Type publishes content statically and does not rely on a resident dispatcher. Unlike Wordpress, your webserver is responsible for serving up 404 pages when faulty URLs are entered.  

Out of the box, this is an eye sore.  I noticed that my site was doing this, and most MovableType sites I have visited this morning are doing the same.  Since the fix is quick, I thought I'd do a write up.

Assumptions:
  • you are running Movable Type 4+
  • Apache is your web server of choice
  • your web server is configured to allow for overrides (.htaccess).  If not, you can put these directives in your site configuration file and reload Apache itself
Method:
  1. Create a page via the Movable Type admin interface.  Set the filename field to '404.html'
  2. Write up your snarky 404 message, save it, and publish
  3. Add the following line to your .htaccess file: 

    ErrorDocument 404 /404.html

That's it!  You should be able to hit some bad urls on your site and see your nice new error page.

0 TrackBacks

Listed below are links to blogs that reference this entry: A Nice 404 Handler For Apache and Movable Type.

TrackBack URL for this entry: http://www.styledbits.com/mt-tb.cgi/28

Leave a comment

Recent Entries

Goodbye, Old Friend
We had to put our wonderful dog, Sassey, to rest today.  She was 15 years old, and while not having…
State of the Garden: May 2008
Late last year I decided that I would learn how to grow food in an urban environment.  I'm not talking…
The Cult of Information
I finished Theodore Roszak's The Cult of Information a few weeks back and am just now writing my notes.…
Examining Yama, The First Limb of Yoga
I began a basic practice of Yoga several months ago, wanting to learn more about my mind's influence over existence.…
A Nice 404 Handler For Apache and Movable Type
By default, Movable Type publishes content statically and does not rely on a resident dispatcher. Unlike Wordpress, your webserver is responsible…