• I think my htaccess is causing a link error with my blog pages. I have wordpress setup on my root directory, and I have 2 additional directories with their own htaccess for password protection.

    Something happened with my site causing all the wordpress links not to work. I was advised to update my permalinks, which I did WITHOUT changing, only hitting the save button from the admin panel. That fixed the wordpress link errors…

    but

    It caused 404 errors at my other 2 directories. I’m on dreamhost and they aren’t helpful – they only say I need to edit my htaccess file.

    I’ve searched and found info on how to fix the 404 problem, but then that causes wordpress link errors again!

    I keep going in circles! My site was working fine yesterday.

    Here is my current htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} “/slave-pit/”
    RewriteCond %{REQUEST_URI} “/downloads/”
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    With this version my other 2 directories work fine, but not my wordpress links.

    With the following version, my wordpress links work, but not my other 2 directories!

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} “/slave-pit/”
    RewriteCond %{REQUEST_URI} “/downloads/”
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    What am I doing wrong??

    TIA

Viewing 1 replies (of 1 total)
  • If you access physicall files inside /slave-pit/ and /downloads/ directory, standard WordPress generated .htaccess file should work fine. Except if you also doing rewrite on those two directories, you should have .htaccess in each directory to handle rewrite for that particular directory.

    Rewrite rule works outward. I mean if the most inner directory has .htaccess, the web server will process it, then process .htaccess on parent directory.

    So, the solution for your problem is to have .htaccess in each directory to perform rewriting in each particular directory, unless you only access physical files in those directories.

Viewing 1 replies (of 1 total)

The topic ‘htaccess causing link error?’ is closed to new replies.