Forum Discussion
Thomas_Broeste_
Nimbostratus
Nov 16, 2006Wildcard
Hi
I have the following problem
I've made an Irule looking like this
when HTTP_REQUEST {
if { [HTTP::host] contains "domain.dk" } {
HTTP::host
pool pool_PresDK
log local0. "domain.dk...."
}
elseif { [HTTP::host] contains "domain.no" } {
HTTP::host
pool pool_PresNO
log local0. "domain.no...."
}
elseif {[HTTP::host] contains "domain.se"} {
HTTP::host
pool pool_PresSE
log local0. "domain.se...."
Above is working fine. All domain is pointing at the same IP address. I now have a series of other domains that point to the same IP adress, but needs to go to the same pool. I need some kind of wildcard so that every hostname not matching the above rule will be sent to the same pool. See below
}
elseif {[HTTP::host] contains "%any domain but not above%"} {
HTTP::host
pool pool_PresDK
log local0. "domain.dk...."
}
}
Anybode got any idea??
best regards
Thomas
- hoolio
Cirrostratus
You can just use 'else' at the bottom to set a default action for any requests that don't match the first conditions:if { condition1 }{ do something } elseif { condition2 }{ do something else } elseif { condition3 }{ do something } else { do a default action }
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