WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
www.xyz.com/place?id=(variable)

which I would like in the format:

www.xyz.com/places/(variable)

www.xyz.com/tags?id=(variable)

which I would like in the format:

www.xyz.com/type/(variable)

www.xyz.com/things-to-do-in?id=(variable)

which I would like in the format:

www.xyz.com/things-to-do-in-(variable)

I tried

add_rewrite_rule(
    '^http://www.xyz.com/things-to-do-in-([^/]*)/?',
    'http://xyz.com/things-to-do-in?id=$matches[1]',
    'top'
);

but its not working. What should I do?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.