WordPress.org

Support

Support » How-To and Troubleshooting » Permalinks not working

Permalinks not working

  • I’m working on a blog that was installed using GoDaddy’s one-click install on a site into a “blog” directory. There was no .htaccess generated (yes, I can see hidden files). I tried adding one in blog directory and then setting the permalink structure, but I get the message in the dashboard that my .htaccess file can’t be modified. It’s looking in the root, not the WP directory. When I tried simply adding the WordPress rules to the root level .htaccess, it worked, but whenever an incorrect url is typed in for the site at the root level it no longer returns the custom error page, but instead goes to the blog home page. This is the code that I added:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    @esmi

    Forum Moderator

    What site url are you using for your blog?

    It’s at http://domainname.com/blog. I removed the rewrite rules from the root level htaccess since it was causing the error page problem, so you can’t actually see the behavior on the site right now. I’d prefer not to share the client’s site info here, but if I need to, let me know.

    esmi

    @esmi

    Forum Moderator

    You could now try and add the WP rewrite rules to an .htaccess file in the blog folder. I’ve got a couple of WP installs running in sub-folders with non-WP sites in the root folder. I’ve not come across a problem before and certainly not one where WP tried to add something to the root .htaccess file. In each case, it’s the installation folder’s .htaccess file that’s been re-written.

    I’ll try that – thanks!

    Success! Thanks for the help!

    esmi

    @esmi

    Forum Moderator

    Did you manage to figure out why WP was initially writing to the root .htaccess file?

    I think that was my misunderstanding. I assumed that it was looking in the root because of the recommended rewrite rules, but that wasn’t the case.

    esmi

    @esmi

    Forum Moderator

    OK. Glad to heat you got it sorted anyway.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Permalinks not working’ is closed to new replies.
Skip to toolbar