I'd like to know how to provoke a 404 error in apache as well right now. Currently I'm scanning the docs at htttpd.apache.org to find out more. First I thought mod_rewrite is capable of changing statuscodes but this seems to be for redirects only and 404 is not a redirect code.
Where did you start to look for it, which way of research have you thought of?
If you want to 'create' a conditional 404 with mod_rewrite, simply internally-rewrite the request to a non-existent URL-path. Or use the [G] flag on a rule to create a 410-Gone response for HTTP/1.1 clients (and later).
[edited by: jdMorgan at 7:11 pm (utc) on April 20, 2008]