Forum Discussion
GabrielDeLeon_1
Sep 26, 2014Nimbostratus
IRULE - Search in http query and set two variables
Good afternoon, sorry for my English. I need to store two variables from a uniq query. For example: www.example.com/test.jpg?aserver=2&bserver=3 I need a irule looking aserver value and s...
Arnaud_Lemaire
Sep 26, 2014Employee
Hello you can get inspiration from this one : https://devcentral.f5.com/wiki/iRules.URIInterrogation.ashx
when HTTP_REQUEST {
set namevals [split [HTTP::query] "&"]
for {set i 0} {$i < [llength $namevals]} {incr i} {
set params [split [lindex $namevals $i] "="]
set pnum [expr $i+1]
log local0. "Param\[$pnum\]: [lindex $params 0]"
log local0. "Value\[$pnum\]: [URI::query [HTTP::uri] [lindex $params 0]]"
}
}
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