[wp-hackers] Should Monthly Archive Pages ever return 404?
jess at funroe.net
Mon Mar 9 18:56:18 GMT 2009
Problem is there is not a proper HTTP error code that I could find
dealing with your situation. Correct me if I am wrong.
404 means not found. There are a couple of 3xx error codes, but I
don't think any would apply to a guessed URI like your example. Giving
a guessed URI a 200 is probably not appropriate.
Building a useful 404 is probably the best way to go. You can make
them quite complicated and keep your 404 functionality in your theme.
I typically use at the minimum a site page list and search form. My
personal theme framework injects a "report broken link" form allowing
visitors to send a notice with their e-mail address if they get there
with a referrer. Sniffing the URI for some archive, category, tag,
etc. wouldn't be too hard and might be a nice idea for some sites. I
A 404 is important and personally I really wouldn't want to promote
bad habits of URI guessing by visitors.
[ :P ] jess planck - http://funroe.net
On Mar 9, 2009, at 1:38 PM, Mike Schinkel wrote:
> The problem with a "helpful 404 page" is that such a 404 page must
> know about all potential error states in a system to be helpful vs.
> allowing the pages that already know about "the error states" to
> take action. It would seem to me a lot more appropriate for a page
> to be able to "punt" and say "Ya know, I consider this a 404" if it
> wants to trigger such a use case rather than having to modify the
> 404 for every potential error situation. This is like having a
> function called "display page" with a case statement that hard-codes
> (i.e. doesn't delegate to any other code) what to display for each
> URL; it's crazy architecture.
More information about the wp-hackers