Rafa_F
#1
Hi,
I have this nginx rule:
rewrite ^/(.*)?$ /index.cfm?event=saveURL=$1 last;
cuts off ?id=1
How can I fix this? Thank you!
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,267813,267813#msg-267813
iivan
#2
Hi,
On 2016/06/23 20:10, iivan wrote:
cuts off ?id=1
How can I fix this? Thank you!
rewrite doesn’t match query string due to its non-positional value (is
it the correct term? Also it’s just my guess).
this should work:
rewrite ^/(.*)?$ /index.cfm?event=saveURL=$1$is_args$args last;
or just:
rewrite ^ /index.cfm?event=saveURL=$uri$is_args$args last;
Or might even be:
location / {
proxy_pass
http://myproxy:port/index.cfm?event=saveURL=$uri$is_args$args;
proxy_set_header …;
…;
}
- no idea about encoding/escaping.
iivan
#3
Thanks nanaya,
It is the solution I was looking for!
rewrite ^/(.*)?$ /index.cfm?event=saveURL=$1$is_args$args last;
You are the best 
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,267813,267830#msg-267830
iivan
#4