How to make rewrite the uri by means of nginx?

There are URI /WCP_TEST00/ru_RU/?N="WebUser"&P=&C="classname=codecs
You need to change the on /WCP_TEST00/ru_RU/?N="WebUser"&P=&C="code:codecs"
to make upstream to server_name2

doing so

location / {
rewrite_log on;
rewrite ^/(.*code)=(.*)$ $1:$2";
proxy_pass https://server_name2;
July 4th 19 at 22:59
1 answer
July 4th 19 at 23:01
Maybe someone should. Have done so:

location / {
rewrite_log on;
if ($request_uri ~ ^/(.*code)%3D(.*)$ ) {
set $request_url $1%3A$2% 22;
proxy_pass https://server_name2/$request_url;

Find more questions by tags Nginx