• Resolved Alicia

    (@sexydawnt)


    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:
    https://sunshineflgirl.freenclearstuffnewsletter.com/wp-content/themes/twentytwelve/screenshot.png

    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:

    1. Complete fresh WordPress install with fresh files
    2. 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>
    3. 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Alicia

    (@sexydawnt)

    Ok – so the domain name is fully propogated and I am still having this issue.

    When I go to this link (or any other image):
    https://livinginlyrics.com/wp-content/themes/twentytwelve/screenshot.png
    I get this error:

    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.

    Any ideas?

    Thread Starter Alicia

    (@sexydawnt)

    Ok – After several hours, I finally found the trouble. For some reason, WordPress was not creating an .htaccess file, so I was creating one. Whenever I checked my .htaccess file to another wordpress .htaccess file, I found this:

    # 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

    I updated the .htaccess code to reflect that and the problem is solved.
    So, hopefully, if anyone else has any trouble with this, my solution can help them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Forbidden Access on new install’ is closed to new replies.