Please take a look at the following .htaccess
ErrorDocument 404 /404/
RewriteEngine On
RewriteRule (.*) index.php [L]
With this setup, I am using header('HTTP/1.1 404 Not Found');
in PHP to redirect to the error handling page and send the appropriate HTTP status code. The correct 404 status code is sent, but the browser shows a blank page and the access log shows "GET /invalid-url/ HTTP/1.1" 404 -
Can anyone tell me how to make ErrorDocument work with Apache URL rewrites?