I must do a little trick for a site! The idea is:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /default.php [L]
It is not mentioned here but FallbackResource is the new recommended way of handling not-found (404) URLs. Example:
FallbackResource /not-404.php
From Apache manual:
Use this to set a handler for any URL that doesn't map to anything in your filesystem, and would otherwise return HTTP 404 (Not Found).
Implement a 404 error rule. Doesn't require mod_rewrite:
ErrorDocument 404 /default.php