WordPress Permalinks HTAccess Not Working

I have a blog (http://pra.getsquared.me) which is really at (http://www.getsquared.me/blogs/praquilone) and I used to have the custom permalink

/%category%/%postname%

Read More

but I wanted to change it to

/%year%-%monthnum%-%day%-%category%-%postname%-%post_id%

The old one worked the new one does not. And when I say it did not work, the post links on the frontpage show the new form, but clicking on it gives me a page not found error.

From what I read (and I may be wrong) the htaccess file might be the issue. I just have the standard stuff it in.

#
# BEGIN WordPress
#
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blogs/praquilone/
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blogs/praquilone/index.php [L]
</IfModule>
#
# END WordPress
#

Do I need to update it? If so how do I change it? If not, what else could be wrong?

Thanks

Related posts

Leave a Reply

2 comments

  1. htaccess just redirects anything to index.php, which loads WordPress system (wp_load()). WordPress has a component, that parses REQUEST_URI.

    First it tries to to bind REQUEST_URI into one of its regexes, which makes it understand what kind of resource is being requested (category, tag, page, post, etc), then it tries to find which resource it is (if it’s a post, find which post by it’s slug).

    The cause of your problem is that ‘%category%-%postname%’ isn’t being parsed. It’s just a sequence of words like ‘category-name-post-name’, so WordPress doesn’t understand where category ends and postname starts.

    It’s unable to bind a regex, and it fails. Note that previously they were being split by ‘/’, which differs from ‘-‘, but now it doesn’t work anymore. Also, always end a rewrite_rule with ‘/’.

    Try: /%year%-%monthnum%-%day%-%category%-%post_id%-%postname%/
    But using that you can’t have numbers on categories and post slugs!

    Better rule: /%year%-%monthnum%-%day%/%category%/%post_id%/%postname%/

  2. Well, I’m assuming you went through WP-ADMIN to change your Settings > Permalinks to the newly desired permalinks.

    Sometimes…. I find that changing your permalinks to another format, saving it, then changing it the one you want, and saving that does the trick. Your .htaccess file looks normal to me.

    Sorry I can’t be of more help.