0

I have a WordPress site and I have case that needs the following url:
http://www.domain.com/compare/productA
to be rewritten to:
http://www.domain.com/compare?product=productA
but at the same time I have comparison pages already have this url:
http://www.domain.com/compare/productA-vs-productB
so what I need is adding the rewrite rule when the string doesn't contain "-vs-" ..How should be done with add_rewrite_rule function ?

Your Answer

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

Browse other questions tagged or ask your own question.