2

I’ve been grappling with a basic rewrite rule as we’ve changed a template name from template-a to template-b and need to 301 all links to the new template-b URLs. Example:

/trusted-installers/template-a/something-here/and-possibly-here

Should be 301 redirected to:

/trusted-installers/template-b/something-here/and-possibly-here

I know I need a pattern match and R=301 but so far I’ve not got this to work quite right. Any quick suggestions would be very gladly received.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
Russ Back
  • 143
  • 4

1 Answers1

0
RewriteRule ^/trusted\-installers/template\-a/(.*)$ /trusted-installers/template-b/$1 [R=301]
Shane Madden
  • 114,520
  • 13
  • 181
  • 251