i wanna add a rewrite rule to apache 2.2 .htaccess file that if the rest of the rewrite rules did not comply and if the url is not found, to redirect to a specific php file. how do i do that ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A simpler solution might be to set up a custom 404 error page. Add something like this to your httpd.conf file…
If you just want a “catch all” rule that will be used if nothing else is a match, try something like this…
This will need to be the last rule that apache finds though, as they are handled in the order they appear (as far as I know anyway…)