Wordpress用params重写URL

I have the following url and I'm using the type parameter in a WP_Query to generate a list of posts.

http://wordpress.dev/en-ie/category-holiday-deals/?type=city-breaks

I want to rewrite the url so it looks like this:

http://wordpress.dev/en-ie/holiday-deals/city-breaks

but I want to be able to use the type param still.

I have the following that's capturing the query vars:

add_filter('query_vars', 'sd_query_vars', 10, 1);

function sd_query_vars($vars) {
    $vars[] = 'type';
    $vars[] = 'destination';
    return $vars;
}

but I can't figure out how to rewrite the URL.

Any suggestions?

Whenever I've had to handle redirects with WordPress, I have used a plug-in like Rewrite. It gives you a nice interface to create rewrite rules.

I've found it's a lot easier than fiddling with the .htaccess file directly.