I don’t have too much experience with .htaccess files and I would like one that disallows access (403 Forbiden) to .myext files in a folder and all its sub-folders.
Can anyone write me a quick rule?
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.
You can use
<FilesMatch>andDeny:You also might need to change the order of how
AllowandDenyrules are applied.Another option would be to use mod_rewrite:
To have these directives only be applied on specific directories, put them into the .htaccess file of that specific directory. With mod_rewrite you could also specify the path within the rule pattern like: