Forums

UTW and /%category%/%postname%/ Permalinks (15 posts)

  1. themack
    Member
    Posted 3 years ago #

    I am experiencing an error when using Ultimate Tag Warrior and permalinks set up as /%category%/%postname%/

    I have tried editing my htaccess to:

    # UTW
    RewriteEngine On
    RewriteBase /
    RewriteRule ^tag/(.+)/$ /index.php?tag=$1 [QSA,L]
    RewriteRule ^tag/(.+)$ /index.php?tag=$1 [QSA,L]
    RewriteRule ^tag/(.+)/feed/(feed|rdf|rss|rss2|atom)/$ /index.php?tag=$1&feed=$2 [QSA,L]
    RewriteRule ^tag/(.+)/feed/(feed|rdf|rss|rss2|atom)$ /index.php?tag=$1&feed=$2 [QSA,L]
    RewriteRule ^tag/(.+)/(feed|rdf|rss|rss2|atom)/$ /index.php?tag=$1&feed=$2 [QSA,L]
    RewriteRule ^tag/(.+)/(feed|rdf|rss|rss2|atom)$ /index.php?tag=$1&feed=$2 [QSA,L]
    RewriteRule ^tag/(.+)/page/?([0-9]{1,})/$ /index.php?tag=$1&paged=$2 [QSA,L]
    RewriteRule ^tag/(.+)/page/?([0-9]{1,})$ /index.php?tag=$1&paged=$2 [QSA,L]

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

    # END WordPress

    But that dosen't seem to work, if I change my permalinks to /%year%/%monthnum%/%day%/%postname%/ or anything else that dosen't have /%category%/ as the first tag it works fine.

    It seems that there is somthing awry with the /%category%/ permalinks and the /tags/ redirect that UTW uses.

    Has anyone found a work around, explanation or hack to solve this problem?

  2. schulte
    Member
    Posted 3 years ago #

  3. LesBessant
    Moderator
    Posted 3 years ago #

    I'd also suggest asking the question in the UTW Forums. Christine is very helpful in supporting her plugin.

  4. themack
    Member
    Posted 3 years ago #

    Thanks for the tips, seems Christine is already aware or the problem.

    Might be a bug with something in WP. Hopefully someone can find a solution! =D

  5. deanhatescoffee
    Member
    Posted 2 years ago #

    Has anyone come up with a solution to this? I'm also experiencing the problem and it makes me a little sad. :( jk, but I would like to know how to get it resolved.

    Apache guru Nathan Dove (http://nathan.studiodifferent.com) determined that my problem with UTW is this exact issue. He suggested creating a regex that matches everything except the string "tag". Does anyone know how to do this?

  6. deanhatescoffee
    Member
    Posted 2 years ago #

    Nathan Dove has been working on this thing for a week and, through his extreme diligence and hawesomeness, he was able to make a fix! Here's what he said:

    -----------------------------------

    I just told the internal rewriter to ignore links beginning with "tag/" (function parse_request() in wp-includes/classes.php, line 1542). It's a bit kludgy, but I think it's production-ready.

    if (!preg_match("!^tag/!", $request_match) && (preg_match("!^$match!", $request_match, $matches) ||
    preg_match("!^$match!", urldecode($request_match), $matches))) {

    -----------------------------------

    That's it! HUGE thanks to Nathan for the fix!

  7. hdlee
    Member
    Posted 2 years ago #

    I am sorry to tell you that the solution was actually partial. The HTTP header still returns 404, although the content is right.

    Check with HTTP Live extension for Firefox or if you use Google Sitemaps, you will be notified.

  8. tyr
    Member
    Posted 2 years ago #

    I'm just running into this same issue two month's later. Is the solution mentioned by deanhatescoffee still the best thing we've got going?

  9. Chris_K
    Administrator
    Posted 2 years ago #

    Have you tried the most recent version of UTW?

    If you're using SideBlog, make sure you have the most recent version of it as well.

  10. xinfo
    Member
    Posted 2 years ago #

    check this post which i posted about the tag hope help full for you http://wordpress.org/support/topic/84738?replies=3

  11. clwill
    Member
    Posted 2 years ago #

    I have a fix for the UTW %category% permalink structure issue. It doesn't require the .htaccess stuff, or editting WP core files. Two lines of code in UTW.

    See my post here:

    http://www.neato.co.nz/forum/read.php?4,1436

    on the UTW forums.

  12. Xander
    Member
    Posted 2 years ago #

    clwill, that fix is not for WP 2+ is it?

  13. Xander
    Member
    Posted 2 years ago #

    After looking through countless support topics, hacks, fixes, articles, et cetera - I found out that all I have to do is slide over to the Permalinks page and hit "Update Permalinks"... haha.

  14. Xander
    Member
    Posted 2 years ago #

    I realize I'm being vague.

    1) install clwill's fix
    2) update permalinks
    3) profit!

    It works!

  15. Xander
    Member
    Posted 2 years ago #

    That fix again, since the UTW forums seem to be down:
    http://209.85.129.104/search?q=cache:a-kDy2tz198J:www.neato.co.nz/forum/read.php%3F4,1436+site:http://www.neato.co.nz/forum/read.php%3F4,1436+clwill&hl=en&gl=ca&ct=clnk&cd=1

    Additionally, I believe the newest version of UTW fixes this problem.

Topic Closed

This topic has been closed to new replies.

About this Topic