diff --git a/fp-plugins/prettyurls/plugin.prettyurls.php b/fp-plugins/prettyurls/plugin.prettyurls.php index 4000f10..beb351e 100644 --- a/fp-plugins/prettyurls/plugin.prettyurls.php +++ b/fp-plugins/prettyurls/plugin.prettyurls.php @@ -302,7 +302,7 @@ class Plugin_PrettyURLs { } - $url = preg_replace_callback('{category/([^/]+)}', array(&$this, 'handle_categories'), $url); + $url = preg_replace_callback('{category/([^/]+)/}', array(&$this, 'handle_categories'), $url); $url = preg_replace_callback('|page/([0-9]+)/$|', array(&$this, 'handle_page'), $url); @@ -327,8 +327,9 @@ class Plugin_PrettyURLs { } function check_url($url) { - if ($url != '/') + if (!empty($url) && $url != '/') { $this->fp_params = array('entry'=>'entry000000-000000'); + } } function cache_delete_elem($id, $date) { @@ -559,4 +560,4 @@ STR; } -?> \ No newline at end of file +?>