Forum Discussion
fabien59_187669
Nimbostratus
Mar 17, 2017Persistence based on URI regexp
Hello everyone,
I would like to create a persistence rule based on a work order ID in the URI.
I have to persist when the URI of my web site contains workorder/WO-123456789 (123456789 = 9 digits...
Stanislas_Piro2
Cumulonimbus
Mar 17, 2017Hi,
you can try this code:
when HTTP_REQUEST {
set uri [HTTP::uri]
if { $uri contains "workorder/WO-" && [regexp {workorder/(WO-\d\d\d\d\d\d\d\d\d).*$} $uri garbage woid]} {
persist uie $woid
log local0. "persist OK workorder id found. URI = $uri / workorderID = $woid"
} else {
log local0. "URI workorderID not found. URI = $uri"
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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