I am trying to rewrite a url so that all requests for /admin get a 404 except for admin/special_page and admin/another_special_page etc.
I think I need some regex magic to help, but I’m not sure?!
Thanks all
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.
Please try to write this in your .htaccess-file:
The first RewriteCond blocks every request to the “admin”-folder, the other two conditions exclude the two special pages. The RewriteRule will not change the URL but create a 404-error