• Someone using my tagging plugin is having an issue where the rewrite rules aren’t being used appropriately.

    I’ve had him drop in the example code from the codec documentation; so *in theory* it should be working as a plugin ideally should (I..uh..need to make a few changes to my plugin code.)

    What happens, is a request for tag/foo comes in; but instead of matching the rule tag/(.+)/?$ it’s matching [^/]+/([^/]+)/?$ instead, which maps on to index.php?attachment=$matches[1]

    I think that it’s trying to create a page for the attachment that matches the name of the tag. In any case, it’s coming back with a 404 and not displaying any posts.

    When I get a request for tag/foo, though; it “all just works”. I’ve got the generic’ish [^/]+/([^/]+)/?$ rule in the list of rewrite rules as well as the tag ones.

    If anyone could point me in the general direction of configuration settings or environment’y things that would cause this behaviour for him, but not for me; I would be extremely pleased.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m the user Christine’s trying to support. Interestingly, it seems mod_rewrite could be the issue as I have added a few lines to my .htaccess to catch some links that are still coming in for an old RSS feed address. So, I’ve added the following to my .htaccess and it apparently does nothing.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^index\.rdf$ /feed/ [R]
    </IfModule>

    So, any ideas?

    My suspicion now, after doing some fiddling with .htaccess on another issue, my current feeling is that this issue is a combination of several factors (none of which, unfortunately, I have the smarts to fix at this time):

    1. WP 2.0’s internal mod_rewrite implementation is busted, at least partially, and messes with actual mod_rewrite.
    2. Either as a consequence of the above, or less likely as an entirely separate issue, mod_rewrite and .htaccess aren’t behaving properly on the hosted server I’m on.

    Someone must have a clue about this… Any ideas?

    shanepike

    (@shanepike)

    Just to raise this issue again in case someone has figured it out since January, I’m having this problem as well. It seems like it might be an issue either when the permlink starts with any dynamic token (e.g. /%postdate%/) or perhaps with the category specifically (e.g. /%category%/). It seems like starting the permalink with a static token might fix the problem (e.g. /archives/%category%/), but obviously many don’t want that static token in there.

    Read more nitty-gritty details here: https://www.neato.co.nz/forum/read.php?7,720

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin Rewriting Less specific rule is being matched’ is closed to new replies.