Apaches %r
log format outputs: "GET /server?id=1 HTTP/2.0"
.
I need to have only the exact same query parameter value ?id=1
as separate field in my logs.
Thus i tried the %q
option, which unfortunately outputs for the same request:
?ReturnUrl=Example.aspx?id=1
For sure there is a rewrite involved, but there must be a way to get exactly what the client send, right? How?
Okay, I got confused in my testing and overlooked that I already had the
?ReturnUrl=Example.aspx
part in the address bar and appended to that?id=1
, which obviously resulted in the output shown above.But there are modifiers
<
and>
which may be used to define if a logged expression is after redirects or before. Important is that:Thus you should better use
%<q
to be equal with%r
.