Forum Discussion
Jeff_Richards_4
Nimbostratus
Mar 15, 2005iRules matchclass
I'm having trouble getting an iRule to work with matchclass. This is the rule I'm trying to use:
when HTTP_REQUEST {
if { [matchclass [HTTP::host] equals $::CorpWebHostNames] } {
use pool CorpWeb
}
else {
use pool ProdWeb
}
}
And I keep getting this error:
01070151:3: Rule [test] error:
line 5: [undefined procedure: else] [else
{
use pool ProdWeb
}]
I've verified that the CorpWeb and ProdWeb pools exist. Can anyone see what's wrong with my rule? Thanks.
- unRuleY_95363Historic F5 AccountYeah, this is due to a known problem with whitespace following the '}' close brace on the line preceding the 'else'. We have a CR for this and will get it fixed in the next release. Getting this extra whitespace is a really easy thing to do if you are at all cutting and pasting.
when HTTP_REQUEST { if { [matchclass [HTTP::host] equals $::CorpWebHostNames] } { use pool CorpWeb } else { use pool ProdWeb } }
- Jeff_Richards_4
Nimbostratus
Thanks! That fixed it.
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