Apache mod_rewrite を使用して、QueryString の値を置き換える必要があります。多くの値を 1 つの新しい値に置き換える必要があります ({oldValueA1, oldValueA2} => newValueA; {oldValueB1, oldValueB2} => newValueB)。このパラメーターは、query_string 内で何度も表示されます。パラメータ値の順序はランダムです。リダイレクトされた query_string に値が 2 回含まれていても、それは問題ではありません。request_uri は可変ですが、リダイレクト中に変更しないでください。
下記は用例です。最初の行には元の URL が含まれ、2 番目の行には新しい URL が含まれます。
localhost/mag/cat/?myParameter=oldValueA1&myParameter=oldValueB1
localhost/mag/cat/?myParameter=newValueA&myParameter=newValueB
localhost/mag/?myParameter=oldValueA2
localhost/mag/?myParameter=newValueA
localhost/dig/cat/?myParameter=oldValueB1&myParameter=oldValueA2
localhost/dig/cat/?myParameter=newValueB&myParameter=newValueA
localhost/dig/?myParameter=oldValueB2&oldValueB3
localhost/dig/?myParameter=newValueB&newValueB
いくつかの条件でいくつかの RewriteRules を試しましたが、この問題の解決策が見つかりません。誰かアイデアはありますか?
どうも!:)