Skip to content

Instantly share code, notes, and snippets.

@adamrosloniec
Created October 22, 2015 12:00
Show Gist options
  • Save adamrosloniec/d2362b7b7931990200af to your computer and use it in GitHub Desktop.
Save adamrosloniec/d2362b7b7931990200af to your computer and use it in GitHub Desktop.
htaccess deny from all - allow only safe files
# htaccess to folder /wp-content/ and /uploads/ and /themes/
order deny,allow
deny from all
<files ~ ".(xml|css|js|svg|svgz|ttf|tiff|tif|otf|eot|woff|woff2|jpg|jpeg|mp3|mp4|asf|wmv|mpg|mpeg|avi|mov|wav|wma|wave|ogg|m4a|ogv|mp4|m4v|ico|webp|webm|swf|flv|bmp|png|gif|pdf|doc|docx|xls|rtf|pps|ppt|pptx|zip|rar)$">
allow from all
</files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment