I've setup a custom publish types known as boxes that actually works fine and uses the default category taxonomy.

I've written a get_query_var towards the top of my category.php to identify clubpenguin-type=boxes within the url and when therefore it only shows posts for the reason that category in the custom publish type boxes.

All of this works fine however i desire a pretty url

ideally something similar to /boxes/category/fancy/

i've attempted that way:

function my_rewrite_rules($rules)
    global $wp_rewrite;
    $my_rule = array(
        '^boxes/category/(.+)/' => '^category/' . $matches[1] . '?cp-type=boxes'
    return array_merge($my_rule, $rules);
add_filter('page_rewrite_rules', 'my_rewrite_rules');

function my_query_vars($vars)
    $my_vars = array(
    return array_merge($my_vars, $vars);
add_filter('query_vars', 'my_query_vars');

All of this does could it be throws a 404.