1

クエリ文字列の値を編集/変更しようとしています。

RewriteCond %{QUERY_STRING} [^|&]return_to=(.*)[&|$] [NC]
RewriteRule /login https://domain/login?return_to=https://otherdomain/%1 [QSA,R] 

わかりやすくするためにスペースを追加しました!この入力を考えると:

https://domain/login ?user=me &return_to=somepage.html

私はこれを期待しています:

https://domain/login ?user=me &return_to=https://otherdomain/somepage.html

しかし、私はこれを取得します:

https://domain/login ?return_to=https://otherdomain/true &user=me &return_to=somepage.htm

まず、なぜ「本当」なのですか?2 つ目は、既存の val を編集せずに前に追加する理由です (QSA がその編集を行うことは理解しています)。

4

0 に答える 0