I perfectly know how to create a custom 404 page in PHP, however I'm wondering if there's a way to give back control to to apache and let it produce the proper 404 page, sending right headers, etc. when my logic says so?
I'm looking at some apache specific functions but can't seem to find anything appropriate. Is that really just not possible? I recall something similar available to e.g. mod_perl by having full access to apache internals, where's that equivalent in PHP?