Hello, I am new to the F5 and iRules, so I took a stab at writing a rule to modify part of a query string. In this case, I was trying to remove the port number from a hostname embedded in a query string. The rule runs with no error, as I can see in the log file, but the query string is unmodified.
Thanks in advance for helping a newbie.
when HTTP_REQUEST {
if {[HTTP::query] contains “mysite.something.com:8081”} {
log local0. “Query String is [HTTP::query]”
HTTP::query [string map { “mysite.something.com:8081” “mysite.something.com” } [HTTP::query]]
log local0. “Query String is now [HTTP::query]”
}
}