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
po...
hoolio
Cirrostratus
Nov 16, 2006You 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
}You could also use switch to do this, but I think the if/elseif/else structure is a little more efficient. You can check the iRules wiki for switch for more info on this.
Aaron
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
