I’m working with a redirection plugin in WordPress that accepts regex and I want to 301 an entire directory to something new.
http://www.example.com/tag/exampletag1/ &
http://www.example.com/tag/exampletag2/
to
http://www.example.com/music/exampletag1/ &
http://www.example.com/music/exampletag2/
Is this possible? There are quite a few tags so I don’t want to do this manually. Would this be easier to do in the htaccess file?
Anything that will get me going in the right direction is great.
The following ruleset in
.htaccesswould redirect/tag/to/music/[R=301]indicates an external redirect with HTTP status code 301.