Skip to content

Instantly share code, notes, and snippets.

@gaboelnuevo
Created August 10, 2017 05:43
Show Gist options
  • Save gaboelnuevo/13a8eb01bfead10b51e4ce1b961baceb to your computer and use it in GitHub Desktop.
Save gaboelnuevo/13a8eb01bfead10b51e4ce1b961baceb to your computer and use it in GitHub Desktop.
httaccess protect files
Order Allow,Deny
Deny from all
<FilesMatch "\.(jpg|gif|png|php)$">
Order Deny,Allow
Allow from all
</FilesMatch>
<Directory "Your directory path/uploads/">
Allow from all
</Directory>
<Files php.ini>
Order Allow,Deny
Deny from all
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment