Question About wp-includes Exclude Firewall Rules
-
I have a question about the following rules your firewall adds to .htaccess:
RewriteRule ^wp-admin/includes/ - [F] RewriteRule !^wp-includes/ - [S=3] RewriteRule ^wp-includes/[^/]+\.php$ - [F] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F] RewriteRule ^wp-includes/theme-compat/ - [F]This works fine, but I noticed there are also other directories within /wp-includes/ with PHP files in them that the above rules miss, like /wp-includes/customize/.
RewriteRule ^wp-includes/.*\.php$ - [F,L]When I add the above to my .htaccess, all PHP files in those directories are forbidden if I try to browse to them, and it seems my site still functions fine (though admittedly it’s just a very basic setup with not many plugins installed).
Are the PHP files in the other directories within /wp-includes/ not able to be forbidden outside access because because they provide some function that requires access, or are they just not important to block?
Also, given that there are plenty of other PHP files we can’t block access to, such as /wp-comments-post.php, and that even if I don’t include the rules listed above and browse to a PHP file within /wp-includes/ it doesn’t seem as though any confidential information is revealed, is it even really worth using the rules above to block the PHP files within /wp-includes/? Just trying to understand whether I should take the rules above and go even further or not really worry too much about this.
Thanks!
The topic ‘Question About wp-includes Exclude Firewall Rules’ is closed to new replies.