I've been making a plugin which handles get parameters. Now I would like to try to rewrite my variables in a friendly form using wordpress rewrite function but my rule won't work. I don't really know how to extend my rewrite rule to get it work on my second and third variable. On the first is getting fired
function drivers_rewrite_rules( $rules ) {
global $wp_rewrite;
$newrules = array(
'drivers/([^/]+)/?$' => 'index.php?pagename=drivers&cat_name=$matches[1]&group=$matches[2]'
);
$finalrules = $newrules + $rules;
return $finalrules;
}
add_filter( 'rewrite_rules_array','drivers_rewrite_rules' );