<div dir="ltr"><div>I'm using rewrite to change some tokens in the url path, and am using ssl proxy to send traffic to a downstream server. <br></div><div><br></div><div>if i post to <a href="https://myhost/start/foo/213/hello">https://myhost/start/foo/213/hello</a>, the request gets to <a href="https://client-service-host/client/service/hello/213">https://client-service-host/client/service/hello/213</a> using the needed certificate. great.</div><div><br></div><div>my question is, how do i retain query string parameters in this example so that if i post(or get)   using query strings, they get also used?<br></div><div><br></div><div>
<a href="https://myhost/start/foo/213/hello?name=world">https://myhost/start/foo/213/hello?name=world</a></div><div>
<a href="https://myhost/start/foo/213/hello?name=world&greet=full">https://myhost/start/foo/213/hello?name=world&greet=full</a>

</div><div>

</div><div><br></div><div>thanks!</div><div></div><div><br></div><div>        location ~ /start/(.*)/(.*)/hello {</div>            # $1 is used to pick which cert to use. removed by proxy pass.<br><div>            rewrite /start/(.*)/(.*)/(.*)? /client/service/$1/$3/$2 ;<br>        }<br><br>        location /client/service/foo/ {<br>            proxy_buffering off;<br>            proxy_cache off;<br>            proxy_ssl_certificate     /etc/ssl/certs/client-service-foo-cert.pem;<br>            proxy_ssl_certificate_key /etc/ssl/certs/client-service-foo.key;<br>            proxy_pass <a href="https://client-service-host/client/service/">https://client-service-host/client/service/</a>;<br>            proxy_ssl_session_reuse on;<br>            proxy_set_header X-Proxy true;<br>            proxy_set_header Host $proxy_host;<br>            proxy_ssl_server_name on;<br>            proxy_set_header X-Real-IP $remote_addr;<br>        }<br></div></div>