domain1.comのすべてのページを別のドメインにリダイレクトするために、.htaccessファイルに次のコードがあります。
RewriteRule (.*) http://www.domain2.com/$1 [R=301,L]
しかし、それは機能しません。firebugで応答ヘッダーを確認しましたが、Locationディレクティブにはまだdomain2.comではなくdomain1.comがあります。変わっていないようです。一部のサーバーではルールに疑問符が必要であるとどこかで読みましたが、どこに配置すればよいかわかりません。私のOSはdebiansqeezeで、apacheバージョンは2.2.16です。
編集:この問題はループを引き起こし、Firefoxは以下を提供します:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept
cookies.
私のサーバーはポンドサーバーの後ろにあります。
手伝ってくれませんか?