.htaccess
September 28, 2004 1:46 PM   Subscribe

As a followup to my previous .htaccess question, I have another. This one appears to be harder. [I explain my blunderings inside]

In converting my weblog around into a nicer format, I'm trying to play nice with old entry titles. I thought I had a foolproof system going before, but now I realize it was asinine. I have a horror show that combines the 4-digit year, the 2-digit month, the 2-digit year, month, and day -- and then the entry title dirified and trimmed -- and then the entry id.

http://www.my.webpageurl.com/content/weblog/YYYY/MM/YYMMDDthe_first_twenty_chaENTRYID.php

Oh, the madness.

Is there a slick little command that would redirect all links in this format (the /content/weblog/ is a dead ringer) to something like this:

http://www.my.webpageurl.com/archives/YYYY/MM/DD/

That way, it would at least hit the daily entry.

I promise I won't be this silly in the future.
posted by jmevius to Computers & Internet (4 answers total)
 
Is mod_rewrite available to you?
posted by yerfatma at 2:07 PM on September 28, 2004


Response by poster: I think so.
posted by jmevius at 2:16 PM on September 28, 2004


Check it out.

RewriteEngine On
RewriteRule ^/content/weblog/(\d{4}/\d{2}/\d{2}/).* /content/weblog/$1 [R]

Or something like that.
posted by i_am_joe's_spleen at 7:38 PM on September 28, 2004


Sigh.

You know, you really just need to overhaul the whole damned thing and do it correctly from the start. This may involve a couple of days of designing a scheme that will last you for ever and ever.

Don't worry, jmevius, I will answer this question. But right now I am very mad at you for being to silly and tied to the old format.
posted by Civil_Disobedient at 7:54 PM on September 28, 2004


« Older Time Warner Digital Phone service, anyone have...   |   Silkscreening Newer »
This thread is closed to new comments.