I have a webapp that needs to process the URI to find if a page exists in a database. I have no problem directing the URI to the app with .htaccess:
Options +Fo
Call this function:
http_send_status(404);