Forum Discussion
Sean_Lagerholm_
Nimbostratus
Jan 24, 2006iRule syntax problems
I keep getting an error that I'm missing a close brace. I'm trying to implement the following irule :
rule myweb_service {
when HTTP_REQUEST {
if {[HTTP::host] eq "mysite1.com"} {
pool mysite1.com
} else if {
[HTTP::host] eq "mysite2.com" } {
pool mysite2.com
} else if {
[HTTP::host] eq "mysite3.com" } {
pool mysite3.com
} else if {
[HTTP::host] eq "mysite4.com" } {
pool mysite4.com
} else if {
[HTTP::host] eq "mysite5.com" } {
pool mysite5.com
} else if {
[HTTP::host] eq "mysite6.com" } {
pool mysite6.com
} else if {
[HTTP::host] eq "mysite7.com" } {
pool mysite7.com
}
else { discard
}
}
I'm not seeing the missing close brace. Can someone give me a hand here? Thanks!
- A couple of points.
when HTTP_REQUEST { if { [HTTP::host] eq "mysite1.com" } { pool mysite1.com } elseif { [HTTP::host] eq "mysite2.com" } { pool mysite2.com } elseif { [HTTP::host] eq "mysite3.com" } { pool mysite3.com } elseif { [HTTP::host] eq "mysite4.com" } { pool mysite4.com } elseif { [HTTP::host] eq "mysite5.com" } { pool mysite5.com } elseif { [HTTP::host] eq "mysite6.com" } { pool mysite6.com } elseif { [HTTP::host] eq "mysite7.com" } { pool mysite7.com } else { discard } }
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