WordPress.org

Ready to get started?Download WordPress

Forums

Category permalinks (10 posts)

  1. colinj
    Member
    Posted 9 years ago #

    Here's the problem I'm running into:

    If I set my permalink structure to either:

    /%category%/%post_id%/

    or

    /%category%/%postname%/

    I get the following when I try to view a single post:

    "Sorry, there aren't any posts that match what you requested."

    What I would like to do is make the categories available at the root level like this:

    http://digitaldetritus.org/musings/

    Which I can do with:

    /%category%/

    as my permalink structure, but this breaks comments and you can't view a post by it's self.

    I've checked and my service provider is running Apache 2.0.

    Can anyone shed any light on this at all?

  2. lawtai
    Member
    Posted 9 years ago #

    does it work without the /%category%/ tag? sometimes permalinks can be finnicky and only work with a certain structure.

  3. ColdForged
    Member
    Posted 9 years ago #

    %category% is a pain. You can try this but you'd likely be better off giving up on having the category in your posts permalink.

  4. Matt Mullenweg
    Troublemaker
    Posted 9 years ago #

    These generally only work on Apache 2.

  5. colinj
    Member
    Posted 9 years ago #

    lawtai,

    Nope /%category%/ as the permalink setting means that I get the same behavior as I described above.

    matt,

    My service provider is running Apache 2 that was one of the things that I checked first ;-)

  6. colinj
    Member
    Posted 9 years ago #

    ColdForged,

    Your link to this post did the trick.

    Any chance this change in the rewrite rules might make it into the next version? Unless of course it breaks something else.

    Here's an example (of it working):

    http://digitaldetritus.org/teched-2005/

    Oh, and you can use that link to follow any blogging I do about this years TechEd.

  7. ColdForged
    Member
    Posted 9 years ago #

    Glad you got it sorted out, and thanks for letting us know what did it.

  8. colinj
    Member
    Posted 9 years ago #

    Oh, but now I realize that if I have multiple categories in the permalink I still get a 404.

    Man, now I have to make up new cards. :-(

    Just to be clear this works:
    http://digitaldetritus.org/musings/republicans-think-that-weather-shouldnt-be-free/

    and this doesn't
    http://digitaldetritus.org/musings/rants/republicans-think-that-weather-shouldnt-be-free/

    The latter is what wordpress generates as the permalink.

  9. colinj
    Member
    Posted 9 years ago #

    Ok, here's my solution. Since I don't really need the permalinks to be of the format /%category%/%postname%/ I set the permalink format back to the sample on the permalink page. I then added the rewrite generated when the format was /%category%/%postname%/

    So, WordPress now generates permalinks based on the date and postname and I can use http://digitaldetritus.org/%category%/ to point folks at specific content. Which is really all I wanted.

  10. colinj
    Member
    Posted 9 years ago #

    Ok, that doesn't work either. If I had the rewrite rules like I describe above then I can't get to the admin scripts because apache then tries to rewrite /wp-admin/

    damn damn damn!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags