Oct
26
9

Dig Those Permalinks

Meta

A little afternoon hacking has produced a new WordPress feature that is in the CVS for the curious. Thoughts? So are you ready to use WordPress yet?

Old links of the style /p123 are being permanently redirected to the new format using a very simple PHP script and a modification of my old mod_rewrite rules. No link left behind! The RSS feeds (feedii?) should be fixed as well. This is a feature I’ve been wanting for a long time and it has been surprisingly easy to implement so far. I need to tweak the bread crumb function still, but that’s an issue specific to this site, not the general implementation.

Also now notice that the date attached to each post is in fact a multi-level link, an idea I stole from the best, Dunstan Orchard.


9 Comments

  • markku October 27, 2003 @ 1:53 am

    Matt, does this require mod_rewrite to get the urls working? Very nice. Now wordpress has nice, dated, identifiable permalinks.

  • Matt October 27, 2003 @ 1:57 am

    This current iteration uses mod_rewrite but it’s concievable that the technique could be adapted to other methods. However mod_rewrite is pretty ubiquitous so we’ll see if there’s demand for another solution.

  • Lars October 27, 2003 @ 9:01 am

    This is great news Matt.

    I stopped by the repository, but I’m not sure what files need updating. Any hints?

  • Matt October 27, 2003 @ 9:15 am

    To be safe I want to say the wp-admin directory and the b2-include directories, plus b2login.php. That’s what we’ve been working on since the .72 release.

  • Lars October 27, 2003 @ 10:00 am

    Thanks Matt, that’s what I thought. Will try later tonight, although I am tempted to skip dinner and have a go right away.

  • Dougal Campbell October 27, 2003 @ 2:53 pm

    Is there any protection to keep you from messing things up by making two separate posts with the same title on the same day?

  • Ben de Groot October 29, 2003 @ 9:18 am

    I would be interested in using WordPress if I could get this function working. I cheched out the CVS and installed it locally. I tried changing the permalink structure through Options > Permalink, and while it generates the .htaccess (which I put in place), it doesn’t seem to actually update the permalinks. And when trying to post a new entry I get a “header already sent” error. How can I make this work?

  • Matt October 29, 2003 @ 9:23 am

    Ben, it’s hard to say exactly where your problem lies. I would suggest asking on the WordPress support forums.

Share Your Thoughts