次の.htaccess
構成があります。
RewriteEngine on
allow from all
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
# otherwise forward it to index.php
RewriteRule . index.php
RewriteCond %{HTTP_HOST} ^domain1\.domain2\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain1\.domain2\.com$
RewriteRule ^(.*)$ "http\:\/\/www\.domain1\.com\/$1" [R=301,L]
RewriteCond %{HTTP_HOST} ^domain1.com$
RewriteRule ^/?$ "http\:\/\/www\.domain1\.com\/" [R=301,L]
とりわけ、www 以外のすべての URL を www のある URL にリダイレクトしたいと考えています。
URL が次のようなページを除いて、すべて正常に動作します。
index?Form%5bplace%5d=Caribbean&Form%5bdestination%5d=Virgin+Islands&Form%5btype%5d=A
www なしで URL を入力すると、リダイレクトは次の URL になります。
index?Form%255bplace%255d=Caribbean&Form%255bdestination%255d=Virgin+Islands&Form%255btype%255d=A
認識されていないため、404エラーが発生します。
これを回避する方法はありますか?