Welcome! Log In Create A New Profile

Advanced

Можно ли сделать такой rewrite ?

August 18, 2010 08:29AM
Есть такой URL

[code]
http://site.tld:8080/patch/to/?command=zzzz&_еще_параметры
[/code]


его нужно проксировать на xx.xx.xx.xx и изменить URL на
[code]
http://xx.xx.xx.xx:8080/patch/to/?command=yyyy&_еще_параметры
[/code]

Все остальные запросы должны просто передаваться без изменений.

Пробую сделать так

[code]
location / {

rewrite ^command=zzzz&(.*)$ command=yyyy&$1 last;

proxy_pass http://xx.xx.xx.xx:8080/;
proxy_redirect http://xx.xx.xx.xx:8080/ http://site.tld:8080/;

}
[/code]

Проксирование вроде работает а rewrite не могу сделать
Subject Author Posted

Можно ли сделать такой rewrite ?

booter August 18, 2010 08:29AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready