December 22, 2007 12:01pm
Thanks to concise advice from Owen Winkler (aka ringmaster), my test Habari install now has the same URLs as my existing WordPress blog. That means that when I move, all my links will still work. It would have been a pain to redo all my internal links, but those three sites out there in the wild web that link to me are really valuable ...
For reference (lines wrapped for clarity):INSERT INTO habari__rewrite_rules
(name, parse_regex, build_str, handler, action,
priority, is_active, rule_class, description)
VALUES ('display_entry',
'%(?P<year>\\d{4})/
(?P<mon0>\\d{2})/
(?P<mday0>\\d{2})/
(?P<slug>[^/]+)[/]{0,1}$%i',
'{$year}/{$mon0}/{$mday0}/{$slug}',
'UserThemeHandler', 'display_post', '8', '1', '0', '');
[Update: Don't copy and past the query above, you'll get spaces in your regex that break it. Use this text version instead. Also, make sure you change the table name to the correct prefix, habari__ is the default and most likely.]
December 28th, 2007 at 7:02am
Hi! Is this the code to make permalinks show the date of the entry? (It should really be an option).
On a totally side note, are you going to write that entry about your journey to Iran?
December 28th, 2007 at 7:30am
Oh, I've found the related Trac ticket with a link to the same instructions and a full explanation. Thanks anyway :)
December 30th, 2007 at 11:28am
I agree that permalinks should be definable. The more people express their desire for it, the more likely it is to happen.
And thanks for the Iran prompt. I've been very slack about it, but I'll write some in the next week.