Here’s an example of how to block all files extensions not listed in the regular expression:
1 2 3 4 |
<FilesMatch "(?<!\.xml|\.css|\.jpg|\.jpeg|\.png|\.gif|\.js|\.pdf|\.svg|\.ttf|\.woff|\.woff2|\.woff3|\.otf|\.eot)$"> Order Allow,Deny Deny from all </FilesMatch> |