Created
December 4, 2013 09:42
-
-
Save Kaapiii/7784908 to your computer and use it in GitHub Desktop.
Restrict folder access on Apache by file type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Restrict folder access (according to permission settings) | |
| # Deny all exept the listed file tpyes | |
| <Files ^(*.jpeg|*.jpg|*.png|*.gif)> | |
| order deny,allow | |
| deny from all | |
| </Files> | |
| # Allow all all listed files | |
| <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|mp3|mpg|mp4|mov|wav|wmv|png|gif|swf|css|js)$"> | |
| Allow from All | |
| </FilesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment