Forum Discussion
Michael_Hunzike
Nimbostratus
Mar 11, 2005Problem with elseif
Okay, this is driving me nuts...I'm trying to get a simple nested if statement working and it's not....
This works:
when HTTP_REQUEST
{
if {[HTTP::host] eq...
Michael_Hunzike
Nimbostratus
Mar 11, 2005First thanks to both of you for responding.
Yea, the missing ] was a typo when recreating a shorter rule to illustrate the problem. It must have something to do with whitespace. This is a total pain. It seems sometimes whilespace is okay and sometimes it's not. Why is an elseif required to be on the same line as a closing brace sometimes and not others? In my first example (which works like a champ) I don't have any problems with else or elseif being on the next line. It only seems to manifest itself when I add an else to the outermost if statement. And in cutting and posting your response code it fails with the following whenj I hit "update" when entering the rule.
line 14: [command is not valid in the current scope][}]
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
