i'm getting trouble with my regex don't know what is wrong with it. it's returning a URi with orls/f instead of orls/f?p=4550. When i pass https://secure.toto02.com/orls/myservice/f?p=4550
my conf file is below
location ~ "^/([a-zA-Z]+)/myservice/(.+)$" {
error_log /var/log/nginx/error-server.log notice;
rewrite_log on;
#proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://192.168.3.45:8080/orls/$2;
proxy_redirect http://192.168.3.45:8080/orls/ https://secure.toto02.com/$1/myservice/ ;
}
Can anyone help?
fand not thef?p=4550.I used what you proposed but it's still not working – skip87 Apr 7 '15 at 18:16if ($args ~ p=4550) { rewrite ^ http://example.com/ permanent; }– Wiktor Stribiżew Apr 7 '15 at 20:49