Forum Discussion
Albert__Tase_70
Nimbostratus
Sep 07, 2007trying to add the below to exsiting irule and keep getting errors please help
} elseif { ($uri starts_with "/dynasearch") || ($uri starts_with "/Dynasearch") || ($uri starts_with "/DynaSearch") } {
HTTP::redirect "http://www.palgrave-journals.com/common/access/replaced.vm"
} else {
pool palgrave-foxtrot
} elseif .....
the part i get syntax errors on is adding the else statement above its being added in the middle of the rule show the start of the next elseif statement.
error message [deprecated usage, use else or elseif] [ ]
else if (http_uri starts_with "/dynasearch" or http_uri starts_with "/Dynasearch" or http_uri starts_with "/DynaSearch") {
redirect to "http://www.palgrave-journals.com/common/access/replaced.vm"
}
else {
use pool palgrave-foxtrot
}
this is in th emiddle of the 4 verserion irule need to get in the 9 version and it just won't let me
atase
Posts:40
09/07/2007 7:50 AM Edit Quote Reply Alert
so are yo usaying it can't be converted it would have to go into the end of the rule ? this rule is 91 lines long
thanks
Al
- hoolio
Cirrostratus
Hi Al,} elseif { something } elseif { something } else { default action }
... elseif {[string tolower $uri] starts_with "/Dynasearch"}{ HTTP::redirect "http://www.palgrave-journals.com/common/access/replaced.vm" } ...
- Albert__Tase_70
Nimbostratus
else if (http_uri starts_with "/dynasearch" or http_uri starts_with "/Dynasearch" or http_uri starts_with "/DynaSearch") { - Albert__Tase_70
Nimbostratus
so are yo usaying it can't be converted it would have to go into the end of the rule ? this rule is 91 lines long - hoolio
Cirrostratus
The structure for an if statement is normally:if {some condition}{ do something } elseif {some other condition}{ do something else } elseif {some other condition}{ do something else } else { take some default action }
- It is very difficult to try to diagnose problems when you only post a small subset of your iRule (especially when an error is dependent on the other parts of the iRule). If you could post the complete section of your if clause, we might be able to help you better.
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