In
http://www.s9y.org/forums/viewtopic.php?t=3320, Garvin says you need some kind of constant subdirectory for each permalink type, so Serendipity knows whether it's displaying an archive, category, entry, or whatever. This is true, because Serendipity doesn't tell Apache to redirect every possible %id% or %title%: it translates %id% to "any number" and %title% to "any text".
Consider it from Apache's point of view. You pass in a URL as some text. Apache goes looking through it and does some string substitutions:
Code: Select all
categories/<something> gets changed to <s9y_dir>/index.php?cat=<something>
archives/<something>.html gets changed to <s9y_dir>/index.php?archive=<something>
It's easy to see that /categories/news needs to be changed to a category.
Now consider more general rules:
Code: Select all
<something> gets changed to <s9y_dir>/index.php?cat=<something>
<something> gets changed to <s9y_dir>/index.php?archive=<something>
What would you do with just /news? What about /january? There's no 'specifier', so there's no way to tell the difference between an archive and a category. Apache will see only text and try to change every URL to an archive.
If you understand mod_rewrite, you can directly modify your .htaccess file. I do exactly this on my current site, because I want to keep the old static pages around until I'm ready to set my blog free. You could add a rule for every category on your blog:
Code: Select all
"/news" goes to "<s9y_dir>/index.php?cat=news"
"/pictures" goes to "<s9y_dir>/index.php?cat=pictures"
"<something>" goes to "<s9y_dir>/index.php?archive=<something>"
...and so on. But then you'd need to add a new rule every time you added a new category, a new entry, or any other new item without a specifier. Major PITA, especially when you forget (and your visitors can't find your link), or when something overwrites your custom .htaccess file (and you have to rewrite it from scratch, because you didn't keep a backup, did you?).
End result: if you don't feel like messing with your .htaccess directly, always include some unique 'specifier' for each type of permalink. That way Apache can figure out how to make its changes, and Serendipity will know what to do.