Welcome! Log In Create A New Profile

Advanced

Re: Get rid of args from $request_uri

Lucas Rolff
August 08, 2017 11:58AM
I use the set_misc module from openresty and do something like:

if ($request_uri ~ "([^/?]*)(?:\?|$)") {
set $double_encoded_filename $1;
}
set_unescape_uri $encoded_uri $double_encoded_uri;

Can probably be improved, but I can use $encoded_uri and get the reslt you’re looking for c0nw0nk.



From: nginx <nginx-bounces@nginx.org> on behalf of Zhang Chao <zchao1995@gmail.com>
Reply-To: "nginx@nginx.org" <nginx@nginx.org>
Date: Tuesday, 8 August 2017 at 16.07
To: "nginx@nginx.org" <nginx@nginx.org>
Subject: Re: Get rid of args from $request_uri





On 8 August 2017 at 22:02:32, chilly_bang (nginx-forum@forum.nginx.org<mailto:nginx-forum@forum.nginx.org>) wrote:
c0nw0nk Wrote:
-------------------------------------------------------
> why don't you use
>
> $uri

Is it not so, that $uri will output an encoded url?

$uri is always the one decode once time and merge the slash(if you enable it).
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Get rid of args from $request_uri

chilly_bang August 08, 2017 05:42AM

Re: Get rid of args from $request_uri

c0nw0nk August 08, 2017 08:45AM

Re: Get rid of args from $request_uri

chilly_bang August 08, 2017 10:02AM

Re: Get rid of args from $request_uri

tokers August 08, 2017 10:08AM

Re: Get rid of args from $request_uri

Lucas Rolff August 08, 2017 11:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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