I’m trying to match a custom query with regex so I can redirect this:
http://www.mysite.com/category/2010/11/title-of-post/?tags=titleoftag
to this:
http://www.mysite.com/category/?tags=titleoftag
I’ve tried redirecting like this:
Source url: http://www.mysite.com/category/(.*)/?tags=(.*)
Target URL: http://www.mysite.com/category/?tags=$2
But this also matches the target URL in itself, so the redirection gets stuck in a loop.
I’m thankful for any help!
this code worked here for me: (the delimiter of the regex is #, but you could easily change it)