Welcome! Log In Create A New Profile

Advanced

[Rewrite] Extract URL part and store in logfile

Posted by kiddigital 
[Rewrite] Extract URL part and store in logfile
October 07, 2011 05:28AM
Hello,

I would like to use rewriting of NGINX to parse a sort of dynamic URL looking like this:

http://my.server.com/x/<somedynamicpart>/z/page.html

to a static URL:

http://my.server.com/x/z/page.html

So the '<somedynamicpart>' is removed from the URL. BUT I need the '<somedynamicpart>' to be written to the logfile.

After rewriting the URL nginx logs serving the request 'http://my.server.com/x/z/page.html'. To this logline I would like to append an extra column (no extra logline preferably, because I would end up with 2 loglines about 1 request) containing the removed URL part.

Any suggestions on how to achieve this? Thx...
Re: [Rewrite] Extract URL part and store in logfile
October 18, 2011 10:32AM
Nobody?
Re: [Rewrite] Extract URL part and store in logfile
November 17, 2011 02:05PM
Last bump....
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready