I’d like to deny multiple files through htaccess.
<FilesMatch (profile|reg|register|..............|)\.php>
order allow,deny
deny from all
</FilesMatch>
I have lots of files (6 folders with like 30 files each) that I want to deny access to, so using the method above by entering them one by one will take time.
Could I deny access to all files in the folders like this?
<Directory /www/php/login/pages>
Order Allow,Deny
</Directory>
To multiple
or go for rewrite rules (
RewriteEngine On)To deny access to all files in the folders:
or simply place a `Deny from all’ directly in that folder…
Update 2015: Using Apache 2.4 or higher, the `Deny from all’ would needs adjustment.