Forum Discussion
Irule to divert traffic - Not working
Ah sorry. This is the irule I implemented before.
rule jira-divertingtraffic{
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "jiratest.corp.chartercom.com" } {
if {class match [HTTP::uri] contains "/rest"} {
pool JIRA-test-pool
}
}
elseif {class match [HTTP::host] not equals "jiratest.corp.chartercom.com" } {
if {class match [HTTP::path] equals "/login.jsp"} {
pool JIRA-test-pool
}
}
else{
pool JIRA-test-external-pool
}
}
}
This is the error I got :
01070151:3: Rule [/Common/jira-divertingtraffic] error: /Common/jira-divertingtraffic:1: error: [undefined procedure: rule][rule jira-divertingtraffic{]
/Common/jira-divertingtraffic:7: error: [parse error: PARSE syntax 140 {syntax error in expression "class match [HTTP::uri] contains "/rest"": variable references require preceding $}][{class match [HTTP::uri] contains "/rest"}] /Common/jira-divertingtraffic:14: error: [undefined procedure: elseif][elseif {class match [HTTP::host] not equals "jiratest.corp.chartercom.com" } {
if {class match [HTTP::path] equals "/login.jsp"} {
pool JIRA-test-pool }
}] /Common/jira-divertingtraffic:23: error: [undefined procedure: else{][else{] /Common/jira-divertingtraffic:30: error: [command is not valid in the current scope][}]
Recent Discussions
Related Content
* 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