404s are not triggering my 404.php template. The header status code, checked in firebug, is a 404, but the page that gets displayed is like a loop with 0 items (as if this were simply an archive page with 0 entries).
If my permalinks start with /%year%/ and I go to bla.com/9999 (which should produce a 404), WP Debug shows the request as a year:
Request: 9999
Query String: year=9999
Matched Rewrite Rule: ([0-9]{4})/?$
Matched Rewrite Query: year=9999
If my permalinks start with /%category%/ and I go to bla.com/zzzzz (which should produce a 404), WP Debug shows the request as a category_name:
Request: zzzzz
Query String: category_name=zzzzz
Matched Rewrite Rule: (.+?)/?$
Matched Rewrite Query: category_name=zzzzz
What's going on? The Show Template plugin (which prints an html comment telling you what template was used to render the page) tells me that the page is rendering with the index.php template. How can I get my 404.php template to load?