Support » Fixing WordPress » .htaccess help

  • Hi, I’m a total noob so bear with me. Whenever I try to get permalinks working (and a .htaccess file is created) I get 403 errors when I try and access my page. I found the following topic in this forum (http://wordpress.org/support/topic/60442?replies=12 ) which outlined the same problem, but the solution suggested just doesn’t work for me. I’m new to .htaccess files so i don’t know If I’ve edited it correctly…here is is what it looks like now:

    Options +SymLinksIfOwnerMatch
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress

    Please help me solve the problem. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m not sure, but I think the IfOwnerMatch statement may be causing the 403’s. The rest of the code looks perfectly normal. Try it without the IfOwner part and see what happens.

    Good luck,
    Michael.

    Thanks for the reply niziol, but no luck. I’ve pretty much followed all the advice regarding similar problems on this forum but it sill wont work. Could it be a problem with my server? I’m sure mod_rewrite is enabled because WordPress creates the .htaccess file…

    The only other thing I can think of is that my wordpress folder is not the root folder of my website. Should the .htaccess be in the WP folder or in the root folder of my website?

    Thanks again.

    No, as long as the proper base is specified. Going to your site with /blog outputs a 403 as does just going to the root. Maybe this is a server issue, if the WP .htaccess file is in the /blog directory, it should only affect that directory, not a parent directory. I’d hazard a guess that something is wonky with your permissions somewhere, even if the htaccess was wrong or not being read, I don’t think it should cause a 403 error.

    Maybe try checking with your host. I’m sorry I have no better solution then that at the moment.

    Good luck,
    Michael.

    EDIT: I’m not sure if this makes a difference or not, but the server returns a 200 OK header with the request, one would think it should return the proper 403 status code, not the OK one.

    OK, I used the Check Server Headers Tool and it first sends out a 301 Moved Permanently header and then it redircts and outputs the 200 OK. It makes me think it’s looking more like a server issue, it seems a bit confused!

    Yeah, I’ve emailed my server so I’ll just have to see what they say. Thanks again for your help.

    ok…silly me. I just heard back from my server and it seems mod_rewrite is not enabled. Therefore I’m using the following format to get my permalinks working:

    /index.php/archive/%postname%/

    with category base: /index.php/category

    and I’ve also added a php.ini in web root containing the code:

    cgi.fix_pathinfo = 1
    cgi.force_redirect = 0

    according to what I’ve read at WordPress support, that should be all I need. BUT! The permalink structure has been implemented but all the links lead to 404s…

    What do I need to do to ensure the links are actually leading to where they need to? visit my site to see my problem. This is really getting to me.

    Thanks in advance,
    Ama

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘.htaccess help’ is closed to new replies.