I am using a fantastic plugin called Query Multiple Taxonomies which provides a widget to "drill down" by category / tag and other custom taxonomies you may have.

The site is livetonom.com.

The widget (on the sidebar) gives URLS ending:


Is it possible to rewrite that to something like:


I tried using a rewrite rule generators but stuff like this added directly to .htaccess did not work:

    RewriteEngine On
    RewriteRule ^([^/]*)/([^/]*)$ /?category_name=$1&locations=$2 [L]

I'm not even sure that adding to .htaccess directly is correct or will work - can anyone let me know if this is a non-starter or how I go about this?

  • Well, maybe we should see what @scribu has to say...
    – Tom Auger
    Jul 17, 2012 at 20:14

1 Answer 1


I think you are on the right track with .htaccess and rewrite rules

What you might consider is a 301 redirect in your .htaccess like this

#fancy name redirect here
redirectMatch 301 ^/restaurant/london(.*)$ /?category_name=restaurants&locations=london

Basically you can then tell people to go to your own friendly URL and they get redirected to the longer one that WordPress uses.

I'd have a look at Perishable Press stupid tricks with .htaccess

As another point of reference you can use go to WordPress Admin > Settings > Permalinks and change the word Category to Restaurants -- but that will mean all your 'categories' are now 'restaurants'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.