Skip to content

Instantly share code, notes, and snippets.

@jelmerdemaat
Created September 16, 2014 09:39
Show Gist options
  • Save jelmerdemaat/398ed0e0958c16846273 to your computer and use it in GitHub Desktop.
Save jelmerdemaat/398ed0e0958c16846273 to your computer and use it in GitHub Desktop.
# Block the WordPress include-only files.
# Source: http://codex.wordpress.org/Hardening_WordPress#Securing_wp-includes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>
# BEGIN WordPress
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment