Forum Discussion
Michael_Hunzike
Nimbostratus
Mar 11, 2005Problem with elseif
Okay, this is driving me nuts...I'm trying to get a simple nested if statement working and it's not....
This works:
when HTTP_REQUEST
{
if {[HTTP::host] eq...
rapmaster_c_127
Mar 11, 2005Historic F5 Account
We're a little overly sensitive to whitespace. Also your HTTP::host line is wrong. Try this:
rule rastak {
when HTTP_REQUEST {
if {[HTTP::host] equals "dev.domain.com" } {
if { [HTTP::uri] starts_with "/wps/portal" } {
log "matched /wps/portal"
pool dev_domain_portal
} else {
log "no match on [HTTP::uri] fallthrough sending to portal home"
HTTP::redirect "http://dev.domain.com/wps/portal/Home"
}
} elseif { [HTTP::host] equals "dev.newdomain.com" } {
discard
}
}
}
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
