diff --git a/wp-admin/wp-options-permalink.php b/wp-admin/wp-options-permalink.php index f05fb69c7..cbc2277ed 100644 --- a/wp-admin/wp-options-permalink.php +++ b/wp-admin/wp-options-permalink.php @@ -135,10 +135,16 @@ for ($i = 0; $i < count($tokens[0]); ++$i) { } +// Code for nice categories, currently not very flexible +$front = substr($permalink_structure, 0, strpos($permalink_structure, '%')); + $catmatch = $front . 'category/'; + $catmatch = preg_replace('|^/+|', '', $catmatch); + ?>
RewriteEngine On
RewriteBase
- RewriteRule ^ [QSA]