Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


Should be 301 redirected to:


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.

share|improve this question
up vote 0 down vote accepted
RewriteRule ^/trusted\-installers/template\-a/(.*)$ /trusted-installers/template-b/$1 [R=301]
share|improve this answer
Great, thanks. I knew it would be an easy one! – Russ Back Sep 23 '11 at 7:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.