Natural Search Blog

Getting 404 errors with Ultimate Tag Warrior?

If you’re running WordPress and you care about SEO, then you’re probably running the Ultimate Tag Warrior plugin too. If you don’t know what I’m talking about, then read my blog SEO tip on tagging.

There’s been a long-standing bug in WordPress 2.X, ever since WordPress switched to internal rewrites instead of external ones within .htaccess. The bug is that UltimateTagWarrior displays 404 errors (File Not Found) on tag pages when you have rewriting of local tag URLs turned on (in Options > Tags in the WordPress admin). The bug usually only manifests itself when you are using custom permalinks (i.e. if you’ve selected “Custom” from the Permalink Options in the WordPress admin).

Well I’ve got good news! I’ve figured out the problem!

Turns out when you have a Custom Permalink structure like /%postname%/ defined, then one of WordPress’ rewrite rules matches against /tag/whatever before the rewrite rules (which are at the end of the list) get a chance to be invoked. Here’s the offending rewrite rule that’s doing the hijacking:

[[^/]+/([^/]+)/?$] => index.php?attachment=$1

That rewrite rule is a bit too greedy!

I used the Internal Rewrite Viewer plugin to figure out what was going on. This Ultimate Tag Warrior bug been a source of frustration for months. Man, it was tricky to track this one down. It’s good to finally know what the issue is — and how it can be fixed!

Other plugins like WP-Print and WP-Email aren’t affected by this because their rules are the very top of the array instead of the bottom.

I’ve alerted Christine, the author of UTW. Hopefully she will come out with an updated version of the plugin soon to put the rules at the top of the array. If not, I’ll will fix the plugin myself and publish the hack here.

replica rolexs

No comments for Getting 404 errors with Ultimate Tag Warrior? »

No comments yet.

Leave a comment

* Do not use spammy names!

RSS feed for comments on this post. TrackBack URI

RSS Feeds
Jan Feb Mar Apr
Jan Feb Apr May
Jun Jul Aug Sep
Oct Nov Dec  
Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Dec  
Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec
Mar Apr May Jun
Jul Aug Sep Oct
Nov Dec    
Jan Feb Mar Dec
May Jun Jul Aug
Sep Oct Nov Dec