I rarely need to do redirects and when I do they're usually simple. This time I'm trying to do something a little more advanced and I'm stumped. Regex is hard :)
This is a WordPress site and I'm using the Redirection plugin by John Godley.
I have a bunch of posts grouped by districts. I need to redirect both the landing pages for those districts:
(landing page) foo.com/listing/old-district/ -> foo.com/new-district/
And all posts within those districts:
(posts in those districts) foo.com/listing/old-district/post1 -> foo.com/new-district/post1 foo.com/listing/old-district/post2 -> foo.com/new-district/post2 etc