RedirectMatch のリダイレクト先URLで、&(アンパサンド)がある場合

RedirectMatch のリダイレクト先のURLの中に、&(アンパサンド)がある場合、
置換されてしまう。

RedirectMatch ^/test/?  http://www.pictnotes.jp?param1=hoge&param2=fuga

RedirectMatch ^/test/? http://www.pictnotes.jp?param1=hoge/test

RedirectMatch ^(/test/?)  http://www.pictnotes.jp?param1=hoge&param2=fuga

RedirectMatch ^(/test/?)  http://www.pictnotes.jp?param1=hogeparam2=fuga
(&が消えている状態)

&を使うためには、エスケープしてあげればOK

RedirectMatch ^(/test/?)  http://www.pictnotes.jp?param1=hoge\&param2=fuga
& -> \&

2009.10.15

Category: Apache, 未分類 / Tags:

Comments

No Comments

Leave a reply

Name *

Mail *

Website