Forum Discussion
SST_87455
Nimbostratus
Apr 22, 2019IRule requires "else" clause?
Loading a SCF config file into new hardware. Getting this warning.
/Common/down4maint_offline_f5_hosted:15: warning: [deprecated usage, use else or elseif][ ]
Being told by support that if...
youssef1
Cumulonimbus
Apr 23, 2019hello,
You should have an irule like that:
if {$host contains "app1"} {
condition
} elseif {$host contains "app2"} {
condition
} else {$host contains "app3"} {
condition
}
The else should not be conditional, so either use elseif again, or remove the condition in your else.
if {$host contains "app1"} {
condition
} elseif {$host contains "app2"} {
condition
} else {
condition
}
Similar problem: https://devcentral.f5.com/questions/http_request-amp-if-elseif-else-statements
if my answer don't resolve your problem can you give me your irule in order to check it.
Regards
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