Please take a look at the following .htaccess
ErrorDocument 404 /404/
RewriteEngine On
RewriteRule (.*) index.php [L]
With this setup, I use 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 appears in the access log"GET /invalid-url/ HTTP/1.1" 404 -
Can someone tell me how to get ErrorDocument to work with rewriting Apache url?
source
share