You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Bryan Call <bc...@apache.org> on 2017/01/10 23:36:04 UTC

Re: URL redirect logging for rexeg_remap

You are combining client and origin server information in the first URL.  Is this what you want to do?  This seems odd since the scheme or path might have changed in the regex_remap plugin.

Can you show what you would like the map url logging to display?

-Bryan

> On Dec 13, 2016, at 7:08 AM, Ye, Hong <Ho...@comcast.com> wrote:
> 
> Hi,
> 
> I need some help to figure out the right way to log URL redirect request. I am using “redirect” and “regex_remap” rules like below:
> 
> redirect http://comcast.net http://www.comcast.net
> map http://mytest.com http://www.comcast.com/m @plugin=/usr/lib64/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/mytest.com.reg
> 
> Here is my logging configuration. Basically, I want to log the request and return target. (The redirect itself had no problem)
> 
> <LogFormat>
>    <Name = "urlrw"/>
>    <Format = "%<cqtd> %<cqtt> %<chi> %<pssc> %<cfsc> %<cqus>://%<shn>/%<cqup> %<{Location}psh>"/>
> </LogFormat>
> <LogObject>
>    <Format = "urlrw"/>
>    <Filename = "urlrw.log"/>
>    <Mode = "ascii"/>
>    <Protocols = "http"/>
>    <RollingEnabled = "1"/>
>    <RollingIntervalSec ="43200"/>
> </LogObject>
> 
> For the redirect rule, I got what I want:
> 
> 2016-12-13 15:07:03 10.21.98.110 301 FIN http://comcast.net/- http://www.comcast.net/
> 
> But for the “map” rule, I got following:
> 
> 2016-12-13 14:58:08 10.21.98.110 301 FIN http://www.google.com/- http://www.google.com/.
> 
> I am using ATS6.2.0. Did I miss something or is there a problem with ATS? Any idea?
> 
> Thanks
> 
> Hong
> 
> 
>