我目前有以下网址:/my-url/?foo=bar
然后使用以下代理规则:
ProxyPass /my-url/ http://mynewlocation.com/my-url/
ProxyPassReverse /my-url/ http://mynewlocation.com/my-url/
所以我最终得到http://mynewlocation.com/my-url/?foo=bar
我想在我回来的网址末尾添加一个新的字符串/ param,因此包含了原始的url查询参数,并添加了我的新字符串。
举个例子让我想说
/my-url/?foo=bar
成为http://mynewlocation.com/my-url/?foo=bar&test=true
我将如何做到这一点?
我尝试将其更改为ProxyPassMatch,如下所示:
ProxyPassMatch ^/my-url/(.*) http://mynewlocation.com/my-url/$1&test=true
ProxyPassMatchReverse ^/my-url/(.*) http://mynewlocation.com/my-url/$1&test=true
导致http://mynewlocation.com/my-url/test=true
因此它只是删除查询字符串,任何人都知道我做错了什么?
感谢