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.
Good work. I see you went the meyer/shea route with ‘quite sorry’. :)
by Jim Amos on July 21 2004, 11:07 pm #
I would have said:
“well if you had typed the right URL in the first place, you wouldn’t be here.”
by Ian Gordon on July 22 2004, 1:00 am #
Couldn’t you have used an .htaccess file to build your own custom error pages?
Or does .htaccess not work with TextPattern?
by valdok on July 29 2004, 11:31 pm #
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 theindex.php
file. So, if the web server gets a request for something likeindex.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.by ramanan on July 29 2004, 11:53 pm #