My website needs a .htaccess file that will redirect a user to index.php when a page is not found. However, I do not want Apache to send a 404 header with the document.
I asked this question earlier:
Apache .htaccess 404 error redirect
The command "ErrorDocument /index.php" produces the exact effect that I want, except that it sends a 404 header with the page. What can I do? Should I overwrite the 404 header with PHP?
Add this to your
.htaccessfile:If the redirect to index.php happens u can get the requested uri by using
$_SERVER["REQUEST_URI"]insideindex.phpMore information: http://httpd.apache.org/docs/current/mod/mod_rewrite.html