Just change the RewriteRule from:
RewriteRule ^archives/category/?([0-9a-z-]+)?/?$ /weblog/index.php?category_name=$1 [QSA]
to:
RewriteRule ^category/?([0-9a-z-]+)?/?$ /weblog/index.php?category_name=$1 [QSA]
You can keep them both if you like. This would give you, for example:
/archives/category/general/
/category/general/
where general is an example category name.
Having /general/ is another story. That would be require some regex gymnastics to prevent /random-category-name/ from screwing with /archives/ and other things dangled from the root.
octolan.com/blog/category/CategoryName/ID-ThePostName is doable, but the CategoryName isn’t necessary since it won’t really contribute anything to the generated search. ID-ThePostName, since it contains the ID, will specify exactly one post. The category is inconsequential in that case. Now, …/CategoryName/ThePostName/ might resolve to more than one post if you happen to have more than one post with the same name in a given category. That’s why year/month/day is used. Having the same name on a given day is far less likely.
Anyway, RewriteRules can accomplish all of this. Just keep in mind that regex matching a category name or anything else directly off of the root is more complicated. Your regexes need to be anchored at the head by a fixed string, typically an extra directory in the hierarchy. Ex: /archives/, /category/, /etc/, …
Thread Starter
beleg
(@beleg)
ok, thank you very much for your explanation =)
I think i’ll stick with octolan.com/blog/cat/CategoryName …
Anyway, this wasn’t a big point … If I can’t have the solution I imagined, let’s do with what’s possible 😉