nanaya
June 23, 2016 07:24AM
Hi,

On 2016/06/23 20:10, iivan wrote:
> Hi,
> I have this nginx rule:
>
> rewrite ^/(.*)?$ /index.cfm?event=saveURL=$1 last;
>
> - Which makes this work:
> http://mywebsite.com/http://notherwebsite.com/page.html
>
> - But if I pass a parameter like this:
> http://mywebsite.com/http://notherwebsite.com/page.html?id=1
>
> 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.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Full URL parameter in nginx

iivan June 23, 2016 07:10AM

Re: Full URL parameter in nginx

nanaya June 23, 2016 07:24AM

Re: Full URL parameter in nginx

iivan June 23, 2016 10:37AM

Re: Full URL parameter in nginx

iivan June 24, 2016 04:26PM

Re: Full URL parameter in nginx

iivan July 25, 2016 01:15PM

Re: Full URL parameter in nginx

Francis Daly July 25, 2016 07:36PM

Re: Full URL parameter in nginx

iivan July 26, 2016 03:46AM

Re: Full URL parameter in nginx

Francis Daly July 26, 2016 02:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
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