I just created a new wordpress blog today, but am having some problems with accessing some of the files in my browser and am getting erros. For instance on ANY of the theme files (including the default Twenty-Twelve theme), I get a forbidden error like the one below.
When I try to access this file:
I get this
Forbidden You don't have permission to access /wp-content/themes/twentytwelve/screenshot.png on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
These are the steps I have taken to try to solve this:
- Complete fresh WordPress install with fresh files
- Adding this code to both the .htaccess file for this site and the one in the Public_Html folder:
<IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule>
- Change file permissions on the affected folder so that all the images are 755
This site is in a public_html folder that has it’s own .htaccess file. Deactivating that file in the main folder causes these files to be accessible. However, none of the other sites in the Public_html folder are having this issue, so I can’t figure out why the .htaccess would impact only this new site and none of the others.
By process of elimination, I have determined that it is this code in the main .htaccess file that is causing problems with this site (but no other)
RewriteEngine on RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
Does anyone have any suggestions on how to fix this?
Thanks in advance for your assistance.
- The topic ‘Forbidden Access on new install’ is closed to new replies.