Forum Discussion
Mojdeh_Koushki_
Nimbostratus
Oct 14, 2005iRule Script in Ver 9 is not functioning
hello
here is my problem, i have a set of bigip for bunch of web farm on ver 4.5.10, which i have this iRule for it and it is functioning Very Well...
if (getfield(http_uri, '/', 2) m...
Oct 14, 2005
Did you try adding the logging statements I suggested. I verified my rule works with a uri of http://hostname/WebApp (or any upper-lower case version of WebApp).
If you could log the original [HTTP::uri] and put log statements in each of the conditions that would help diagnose what the issue is.
Unfortunately, we can't do much without more details.
Try this rule and send post the output from the /var/log/ltm file.
when HTTP_REQUEST {
set uri [HTTP::uri]
set field [getfield $uri '/' 2]
set lower [string tolower $field]
set slash '/'
set field2 [getfield $uri "/" 2]
set lower2 [string tolower $field]
set slash2 "/"
log local0. "URI: $uri"
log local0. "Field: $field"
log local0. "Lower: $lower"
log local0. "slash: $slash"
log local0. "Field2: $field2"
log local0. "Lower2: $lower2"
log local0. "slash2: $slash2"
if { [string tolower [getfield [HTTP::uri] "/" 2]] equals "webapp" } {
log local0. "Found match for webapp!"
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} else {
log local0. "Didn't find match for webapp!"
pool POOL_HTTP_Vlan70
}
}
-Joe
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