Skip to content
Snippets Groups Projects

Harden htaccess for /wp-includes/ direct access

Merged ale requested to merge harden-includes into master
3 files
+ 6
2
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 3
2
@@ -27,10 +27,11 @@ RewriteRule ^gallery/[0-9]+/(.*)$ wp-includes/ms-files.php?file=2010/08/$1 [L]
RewriteRule ^resource/[^/]+/preview/(.*)$ wp-includes/ms-files.php?file=2010/08/$1 [L]
RewriteRule ^resource/[^/]+/download/(.*)$ wp-includes/ms-files.php?file=2010/08/$1 [L]
# hardening of wp-includes
# hardening of wp-includes (with the exception of ms-files.php, the WP multisite file server).
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteCond %{REQUEST_URI} !^wp-includes/ms-files.php$
RewriteRule ^wp-includes/.+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
Loading