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
Either use an elseif
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { $uri starts_with "/webnav" } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]
} elseif { $uri starts_with "/webapp" } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]
} else {
pool POOL_HTTP_Vlan70
}
}
or you could combine them with two expressions or'ed together.
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { ($uri starts_with "/webnav") or ($uri starts_with "/webapp") } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]
} else {
pool POOL_HTTP_Vlan70
}
}
Notice that I assigned the lower cased uri to a variable so the tolower wouldn't have to be processed twice.
-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