rewrite rules. suggested ones don’t work
-
Using mod_rwrite to fake a static page hierarchy is a brilliant hack. Unfortunately I’ve had very bad experiences with the rules suggested by the options->permalinks menu.
Here’s what I get:
RewriteEngine On
RewriteBase /
RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9]+)?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&p=$4&page=$5 [QSA]
RewriteRule ^archives/category/?(.*) /index.php?category_name=$1 [QSA]
Notice that the first rule will fire on ^archives/.*, it just won’t return any match patterns. Thus all category searches return the default page. It’s easy enough to fix by putting the category rule first, but this needs t be done.
Frank
The topic ‘rewrite rules. suggested ones don’t work’ is closed to new replies.