Skip to content

Instantly share code, notes, and snippets.

@f2face
Created March 13, 2018 19:50
Show Gist options
  • Save f2face/e4b12ff3d8f31b51fe9ab6c17831aefb to your computer and use it in GitHub Desktop.
Save f2face/e4b12ff3d8f31b51fe9ab6c17831aefb to your computer and use it in GitHub Desktop.
Case insensitive .htaccess rules to block direct access to specific file extensions.
# Example: phtml, htm, html, php
<FilesMatch "(?i)\.(phtml|htm|html|php)$">
Order Allow,Deny
Deny from all
</FilesMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment