Allow access to specific directory in /wp-content/ after Hardening
-
I have a custom plugin that allows a user to download file(s) from a directory within the /public_html/ directory, but outside of wordpress. It’s triggered by some php files within /wp-content/plugins/{custom-plugin}/{somedirectory}/
But, when I enable Sucuri’s “Restrict Wp-content” it blocks me from executing the php commands within my custom plugin. Which sounds correct. It’s done by adding an .htaccess file into the /wp-content/ directory that reads:
<FilesMatch "\.(?i:php)$"> <IfModule !mod_authz_core.c> Order allow,deny Deny from all </IfModule> <IfModule mod_authz_core.c> Require all denied </IfModule> </FilesMatch>
My question is what can I add to that .htaccess file to allow access to this one particular plugin – either the entire plugin directory, or even the specific php files within the plugin?
Thanks!
- The topic ‘Allow access to specific directory in /wp-content/ after Hardening’ is closed to new replies.