Hello,
I have a .zip file in one of my plugin directories that I want to make sure is publicly inaccessible, for example if I have the file located at *wp-content/plugins/my-plugin/my-plugin.zip*, if someone were to figure out the URL they could download the .zip file which is what I want to prevent
I am unable to use a plugin to accomplish this (Job is very restrictive on adding new plugins), and I thought I had the perfect solution by using an .htaccess file to accomplish this. I added the .htaccess file to the plugin directory the .zip file is located in, but when I add the following code to the .htaccess file the .zip is still downloadable, from the guides I have been following it should throw a 403 status code when the URL is visited instead of allowing the file to be downloaded
<Files “my-plugin.zip”>
deny from all
</Files>
Just wanted to see if anyone had any thoughts on alternative solutions or why my .htaccess file is not preventing access properly?
[ad_2]
301 redirect in .htaccess didn’t work?
Are you using Apache as your webserver?
Can you password protect the parent folder? I know you can do that in Apache to deny access to files in the folder