apacheのRedirectとRedirectMatch

RedirectはURLを引き継ぐけどRedirectMatchはでキャプチャした変数を使わない場合は引き継がない。というのをたまに忘れる。

Redirect      /foo     http://exmaple.com/foo
RedirectMatch /bar     http://example.com/bar
RedirectMatch /baz/(*) http://example.com/baz/($1)
http://localhost/foo/hoge => http://exmaple.com/foo/hoge
http://localhost/bar/hoge => http://exmaple.com/bar
http://localhost/baz/hoge => http://exmaple.com/baz/hoge