Help: How to Prevent Access to Directory?
I have a wordpress blog and am trying to figure out how to prevent visitors from accessing my files that are located in the directory. Here is an example
I have an image located at:
And if I were to type in this URL in my browser, visitors gain access to all my files that were uploaded on December 2009:
Also, if I were to type in this URL in my browser, visitors gain access to all my files that were uploaded in 2009.
Is there a way to prevent this? I added a code to my htaccess file and it disallowed anyone access to these files, HOWEVER, it took my entire website down as well.
The second thing I tried was going into my FTP (Filezilla) and changing the File Permissions for the appropriate folder (wp-content) so that Visitors could just "Read" and NOT "Execute" or "Write". After doing this, visitors cannot access the files and the website is still live, BUT all the images on the website do not show, but the site is still up.
Help would be greatly appreciated. It's been very frustrating.