Forum Discussion
Jonathan_124522
Nimbostratus
Sep 17, 2015Capture value between slashes in uri
I need an irule to capture the characters between slashes in a uri. For example, in the uri www.example.com/test1/test2/test3/ i want to set a variable value to what ever is between the second an...
arpydays
Nimbostratus
Sep 17, 2015Hi, try this
cheers
when HTTP_REQUEST {
set a [getfield [HTTP::path] "/" 3]
log local0. "value = $a"
}
$curl http://10.12.12.145/test1/test2/test3/
config info tmm1[17994]: Rule /Common/getfield : value = test2
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