Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Need help with an 301 htaccess redirect cond and rule doing the following for all the files in these paths:* to*

we are basically adding "new_word" to the new url string.

share|improve this question

Put this in your .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteRule ^wordA/wordB(.*)$$1 [L,R=301]

share|improve this answer

You don't necessarily need to use mod_rewrite to do this. This can also been done with the Redirect statement provided by mod_alias. It will also append the additional path information to the new URL.

Redirect 301 /wordA/wordB
share|improve this answer

Your Answer


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