WordPress.org

Forums

[resolved] 404 for posts if category base is inside permalink structure (3 posts)

  1. lxg
    Member
    Posted 10 years ago #

    I have a problem when using permalinks.
    In my case, I use
    /news/%year%/%monthnum%/%day%/%postname%
    for the permalink structure and /news as category base. I need them to be identical for the Home-Page control plugin.

    Now everything works fine, only when I click to a single post (no matter whether the hpc plugin is activated or not), I get a 404 error. When I remove the /news from the structure, everything is fine again. So why isn't this working on my playground?

    I'm sure this has already been discussed, but I couldn't find anything. Could somebody give me a hint or a link on that? Thanks in advance.

  2. lxg
    Member
    Posted 10 years ago #

    I've tested a bit more, there seems to be a bug in the rewrite conditions written by WP:

    I've included the following code into my site:
    <?php echo $_SERVER["REQUEST_URI"] . '<br />' . $_SERVER["QUERY_STRING"]; ?>
    with the "/news" stuff the output is

    /2005/12/07/hello-world
    year=2005&monthnum=12&day=07&name=hello-world&page=

    without this

    /news/2005/12/07/hello-world
    category_name=2005/12/07/hello-world

    If we can't resolve the errro, could somebody possibly tell me how to correct the rewrite conditions?

    btw, I'm using Apache 2.0.55, if that helps.

  3. lxg
    Member
    Posted 10 years ago #

    The problem is solved; I changed the category base, so WP runs fine again.

    I misinterpreted the installation advisory for the Home-Page Control plugin: It does need its own base to be prepended to the permalink structure, but this doesn't affect the category base.

    Anyway, thanks for supporting. :-P

Topic Closed

This topic has been closed to new replies.

About this Topic