Re: access log request without query string

2017-04-20 Thread Frank Liu
I was thinking about lua but the map regex is much better. Thanks! Frank On Thu, Apr 20, 2017 at 2:25 AM, Oleg A. Mamontov wrote: > On Wed, Apr 19, 2017 at 09:23:11PM -0400, Zhang Chao wrote: > > Maybe lua-nginx-module is more convenient :) > > Please don't overcomplicate such a simple task ;)

Re: access log request without query string

2017-04-20 Thread Oleg A. Mamontov
On Wed, Apr 19, 2017 at 09:23:11PM -0400, Zhang Chao wrote: > Maybe lua-nginx-module is more convenient :) Please don't overcomplicate such a simple task ;) The following approach should just work: map $request_uri $request_path { ~(?[^?]*) $path; } ---

Re: access log request without query string

2017-04-19 Thread Zhang Chao
Maybe lua-nginx-module is more convenient :) On 20 April 2017 at 08:08:46, Frank Liu (gfrank...@gmail.com) wrote: Hi, What's the best way to login the original request uri ($request_uri) without query string? I tried $uri but it seems to be normalized and if I have customized 404 error page /40

access log request without query string

2017-04-19 Thread Frank Liu
Hi, What's the best way to login the original request uri ($request_uri) without query string? I tried $uri but it seems to be normalized and if I have customized 404 error page /404.html, all those requests are logged as /404.html instead of original requests uri. Thanks! Frank _