WordPress URIs, etc.

Posted by joy

Well, I just burned a Sunday night playing around with WordPress URIs and the .htaccess file. Bottom line, if you adjust your permalink structure in Options>Permalinks, lines are added to the .htaccess file.

The problem I thought I was trying to solve was how to redirect my podcasts feed to a new permalink structure….after much playing around and figuring I’d go through my .htaccess file line by line I eventually deleted a few lines that determined a permalink behavior which I wanted to control.

So, now my old feed links work, but my category links give 404s, which isn’t bothering me all that much. I should really look into getting a tagging structure going on here anyway.

Update: the podcasts feed at the old URL structure is broken http://cleverhack.com/archives/category/podcasts/feed/ and any redirect for it is currently failing. However, the new podcasts feed at http://cleverhack.com/category/podcasts/feed/ works just fine.

Update 2: Upgraded to the newest version of podpress 6.3, which seems to have improved the situation and most importantly changed my itunes feed URL. Still working on redirecting the old feed URL - I’m trying all sorts of things and getting myriad 404s, etc.

Update 3: For cryin’ out loud, the following redirectmatch works and gives the desired 301, but only after way too much messing around…what I missed in a way too obvious “your missing glasses are sitting on your head” kind of way was that I needed the ?$ wildcards after the initial file declaration. And now my podcasts feeds are redirected.

RedirectMatch permanent ^/archives/category/podcasts/feed/?$ http://cleverhack.com/category/podcasts/feed/

2 Responses to “WordPress URIs, etc.”

  1. Owen Says:

    That shouldn’t be so - the version of WordPress you’re using shouldn’t alter the .htaccess when you change your permalink structure. It should do that all internally. There is a switch that makes WP use the old method (which does write a bunch of explicit rules to .htaccess) but unless you or a plugin has turned that on, it shouldn’t be doing that.

    It does seem as though your RSS is hacked up quite a bit. Maybe some plugin is messing with things in a way that it shouldn’t.

    In any case, if you just wanted to be rid of the “archives/”, you could use a rule like:

    RewriteRule archives/(.*)$ $1

  2. joy Says:

    Owen, the rewrite rule didn’t work at all.

    What’s happening is that the old feed url is getting redirected to index.php via a 302 redirect with that “default” WP .htaccess entry.

    I am at loss as to how to create a 301 based redirect on WordPress.

    The problem is that everyone and his brother has the old URL for the podcasts.

Leave a Reply