How to remove taxonomy slugs from wordpress URL

I have created a custom post type CARS.

I registered two taxonomies to it. MANUFACTURER and TYPE.

Read More

I have “prettied” the filter urls like so

$new_rules = array(
'cars/(manufacturer|type)/(.+?)/(manufacturer|type)/(.+?)/?$' => 'index.php?post_type=eg_cars&' . $wp_rewrite->preg_index(1) . '=' . $wp_rewrite->preg_index(2) . '&' . $wp_rewrite->preg_index(3) . '=' . $wp_rewrite->preg_index(4),
'cars/(manufacturer|type)/(.+)/?$' => 'index.php?post_type=eg_cars&' . $wp_rewrite->preg_index(1) . '=' . $wp_rewrite->preg_index(2)
);

It works quite fine and forms an url structure like so: domain.com/cars/manufacturer/bmw/type/suv

However, I’ve been unable to solve how to remove the taxonomy slugs from the url. The desired result being:
domain.com/cars/bmw/suv

Related posts