Forum Discussion
DaveC_21078
Altostratus
Aug 27, 2009How can I chab=nge the format of a URL?
I need to be able to search for a URL similar to
http://example.com/adserver/impression/pid=123/oid=860/rand=12345/?click=http://www.publisher.com/track/ad.aspx?click=1&test=2&imp=1
...
The_Bhattman
Nimbostratus
Aug 27, 2009Okay how about this
when HTTP_REQUEST {
set uri [HTTP::uri]
scan $uri "adserver/impression/pid=%d/oid=%d/rand=%d" pidnum oidnum randnum
log local0. "This is the URI = $uri"
log local0. "Pid = $pidnum, Oid = $oidnum, rand = $randnum"
HTTP::uri [string map {"adserver/impression/pid=$pidnum/oid=$oidnum/rand=$randnum/?clic" "ad.imp?pid=$pidnum&oid=$oidnum&rand=$randnum/?pcl"} [HTTP::uri]]
}
I have never done the string map with variables so I hope it works.
CB
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects