views:

5

answers:

1

Trying to do a 301 redirect using apache mod_rewrite:

RewriteRule /the-path/(.*) my-scheme://new-site.com/the-path/$1 [R=301,NC,L]

The path http://site.com/the-path/param1=xyz will redirect to http://site.com/my-scheme://new-site.com/the-path/param1-xyz

But when I use "http" or "https" in place of "my-scheme" in the rewrite rule, it is working as expected.

So I guess mod_rewrite can redirect to only "http" or "https". Anyone can confirm? Thanks

+1  A: 

Not just "http:" or "https:", but pretty close.

Ignacio Vazquez-Abrams