views:

21

answers:

3

I would like to 301 redirect

domain.com/folder/blah_blah

to

domain.com/blah_blah

How can I do this using mod_rewrite?

A: 
RewriteEngine on
RewriteRule  ^folder/(.*)$  $1
protobuf
+3  A: 
RewriteEngine On
RewriteBase /
RewriteRule ^folder/(.*)$ $1 [R=301,NC,L]
Cody Snider
Similar to the other answer, but with the 301 header that bots and browsers both like. ;-)
Cody Snider
A: 

You may want to add QSA as well (=append query string)

So the thing in the brackets would look like [R=301,NC,QSA,L]

Rau