A painting of me

404 Pages

   20 July 2004, early evening

I’ve made a custom 404 / Not Found page for my web site. I felt inspired after reading an interesting write up about them at GraphikJunkie.

Because of my use of mod_rewrite rules and some holes in textpattern, my site is a bit wonky when you stray off the beaten path. Some requests that should return a 404 will not because textpattern will simply complain the requested section does not have a corresponding page template (example). Similarly, some requests for non-existent categories will return blank pages, instead of a 404 (example). Have you guys come across other instances of pages not showing up as you would expect. I hope to fix all these issues at some point in time.

Update: I fixed the problems I was having with 404 pages not showing up for bad section and bad category requests. As it stands a 404 should be correctly served up in all cases where one is required. I will write up a short how-to on the subject shortly since this is probably useful information.

|  

Comments

  1. Good work. I see you went the meyer/shea route with ‘quite sorry’. :)

  2. I would have said:

    “well if you had typed the right URL in the first place, you wouldn’t be here.”

  3. Couldn’t you have used an .htaccess file to build your own custom error pages?

    Or does .htaccess not work with TextPattern?

  4. If the web server gets requests for files that don’t exist, then the .htaccess directive will catch them. With textpattern, all your requests are processed by the index.php file. So, if the web server gets a request for something like index.php?id=101010 and that id doesn’t exist, things will fail but not with a 404. Same with non-existent sections and categories being passed in to Textpattern.

Don't be shy, you can comment too!

 
Some things to keep in mind: You can style comments using Textile. In particular, *text* will get turned into text and _text_ will get turned into text. You can post a link using the command "linktext":link, so something like "google":http://www.google.com will get turned in to google. I may erase off-topic comments, or edit poorly formatted comments; I do this very rarely.