How to setup 301 redirects for multiple query string URLs?

From doing some research, I’d recommend trying out this plugin: Redirection. This plugin allows you to manage 301 redirections.

I played around with the settings and they allows regular expressions which could do the following:

http://some.site/hashtag?tag=some-tag/ to http://some.site/tags/some-tag/

They provide documentation on how to set it up which can be found here. This is what I’ve done when creating the rule, try this:

enter image description here

  • Source URL: /hashtag?tag=(.*)/
  • Target URL: /tags/(.*)

I was testing this out on a local copy of WordPress and I don’t have anything right now that gives me those URL structures. Let me know if that works for you on your end. Again, you can play around with the regular expressions to get it right.

Leave a Comment