Regular expression to match url and ignore querystring

I have migrated my old asp.net website to wordpress and i now am trying to do 301 redirect gracefully .
I am trying to do it by using regular expression with this plugin.

My source url is

http://example.com/outlets/19-awok?page=2

Target url is http://example.com/shop/awok/

I want to get the shop name and ignore everything else coming after it

My try :

/outlets/(d+)-(.*)? => /shop/$2

Another example source url http://example.com/outlets/105-big-bazar?page=453

Read more here: Regular expression to match url and ignore querystring

Leave a Reply

Your email address will not be published. Required fields are marked *