I want to first point out that I have tried to solutions listed in this post and in every case it either hasn't worked or hasn't been appropriate for what I'm trying to do. I have tried several different methods from several different sites and I'm unable to find anything that works for me.
I want to link to a zip file for download. The zip file is in a subdirectory in the wordpress root. I put an empty .htaccess file in that subdirectory, and while I can see the directory index by navigating to http://domain.com/subdirectory I can't access any given file within the directory. When I try to access the file at http://domain.com/subdirectory/file.zip I get a "Page not found" response from wordpress. I also tried adding the following to the .htaccess file in the subdirectory:
<FilesMatch "\.(zip)$">
Allow from All
</FilesMatch>
I also tried adding the following above the # BEGIN WordPress section of the .htaccess file in my root .htaccess as suggested by the question linked above:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/mydirectoryhere/(.*)$ [OR]
RewriteRule ^.*$ - [L]
</IfModule>
Can anyone help me figure out why this is happening? I'm using custom permalinks in my Wordpress installation with the following configuration:
/%category%/%postname%
Here's the contents of my root wordpress installation directory .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Thank you!
.htaccess
?