WordPress.org

Ready to get started?Download WordPress

Forums

Error 403 and htaccess (4 posts)

  1. Jagster
    Member
    Posted 6 years ago #

    Hi

    All my dirs, subdomains etc. gives now error 403 after WordPress installation. The reason is .htaccess, so much I do know.

    RedirectMatch permanent ^/greyhound$ http://www.greyhoundwiki.org
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Any ideas how to fix that?

    Cheers, Jakke

  2. Joni
    Member
    Posted 6 years ago #

    Here's how I've always seen that done:
    RewriteRule ^greyhound/(.*)$ /$1 [R=301,NC,L]

    It basically just strips the string greyhoud out of it so if someone typed in http://www.greyhoundwiki.org/greyhound/index.html
    it would take them to http://www.greyhoundwiki.org/index.html

  3. Jagster
    Member
    Posted 5 years ago #

    My mistake. That first line is one old rewrite rule. It must be ther cos out there is some links.

    Problem is that:

    WP is in the root (http://scooped.org)
    I have a subdomain (http://galleria.scooped.org) and that is actually only one directory, /root/gallery
    Now that URL gives 403 error because of .htaccess by WP installation.

    I must put somekind of rewrite rule in the htaccess but no idea what.

  4. morethanthesky
    Member
    Posted 5 years ago #

    I realize that this is likely too late to help you, but for all those people that end up here, as I did, looking for an answer...

    If you install wordpress in your server root, and suddenly files that are in already-existing directories are returning 403 errors, go into that subdirectory, create an .htaccess file and type this in it:

    RewriteEngine off

    For example, my domain had an images folder in the subdomain. I installed WP and all the images from that directory were forbidden. I stuck an .htaccess file in the "images" directory, and then life was golden.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags