Skip to content

Instantly share code, notes, and snippets.

@imelgrat
Last active August 23, 2017 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imelgrat/13d15c73dedcca0081cf to your computer and use it in GitHub Desktop.
Save imelgrat/13d15c73dedcca0081cf to your computer and use it in GitHub Desktop.
Disable access to all file types except the following (to be placed inside a Wordpress wp-content directory). Full article at: http://imelgrat.me/security/wordpress-htaccess-file-protect/
# Disable access to all file types except the following
Order deny,allow
Deny from all
<Files ~ ".(xml|css|js|jpe?g|png|gif|pdf|docx|rtf|odf|zip|rar)$">
Allow from all
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment