Forum Discussion
Malcom_Sargla_6
Nimbostratus
Jun 29, 2006BIGIP irule Case c279577
Dear Forum;
Can someone please assist with the following issue.
Title: iRules not operating correctly
Severity: General Assistance Condition: Open-Dispatch
Product: BIG-IP LTM Version: 9.1.1
Serial No.: bip062519s Ticket Number:
BigIP irules in place for redirects are not functioning as expected.
Rule 1 -
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] starts_with $::PRV_URIs_no_persist] } {
persist none
pool PRV-Stage
}
}
Rule 2 -
when HTTP_REQUEST { redirect to "https://www2.provisioning.na.blackberry.com"
}
Even though sites matching the first rule is getting hits without errors, it
doesn't stop and moves on to the second rule, causing all sites to get
redirected.
*TROUBLESHOOTING STEPS TAKEN:
Tried reapplying irules and modification of existing by modifying if
statements.
These are the exact configs used in other production environments. Not sure
why it isn't working in this environment.
*DIAGNOSTIC DATA PROVIDED: [tcpdumps, qkview output, logs, ?]
qview output
*IMPACT TO YOUR BUSINESS: [High / Medium / Low, ?]
High
*NUMBER OF F5 UNITS AFFECTED: [HA Pair, Sync Group, Single System, ?]
HA Pair
- Deb_Allen_18Historic F5 AccountTo terminate rule processing for the HTTP_REQUEST event once the condition is satisfied and the pool is selected, you can simply add the command "return" after the pool selection within the condition in your first rule:
when HTTP_REQUEST { if { [matchclass [HTTP::uri] starts_with $::PRV_URIs_no_persist] } { persist none pool PRV-Stage return } }
- Malcom_Sargla_6
Nimbostratus
Thank you very much, Deb. I will try that and post once configured. - Malcom_Sargla_6
Nimbostratus
I wish I could say that worked but unfortunately it did not. Do you have anything else I could try. Thank you again in advance, - hoolio
Cirrostratus
Hi,when HTTP_REQUEST { if { [matchclass [string tolower [HTTP::uri]] starts_with $::PRV_URIs_no_persist] } { persist none pool PRV-Stage } else { HTTP::redirect "https://www2.provisioning.na.blackberry.com" } }
- If you have to have two different HTTP_REQUEST events (Whether in the same iRule or different ones, you can disable further processing on that iRule with the event disable command (Click here).
when HTTP_REQUEST { if { [matchclass [HTTP::uri] starts_with $::PRV_URIs_no_persist] } { persist none pool PRV-Stage event disable } } when HTTP_REQUEST { redirect to "https://www2.provisioning.na.blackberry.com" }
set the priority to 400 when HTTP_REQUEST priority 400 { if { [matchclass [HTTP::uri] starts_with $::PRV_URIs_no_persist] } { persist none pool PRV-Stage event disable } } use the default priority of 500 when HTTP_REQUEST priority 500 { redirect to "https://www2.provisioning.na.blackberry.com" }
set the priority to 400 when HTTP_REQUEST priority 400 { if { [matchclass [HTTP::uri] starts_with $::PRV_URIs_no_persist] } { persist none pool PRV-Stage set issue_redirect 0 } else { set issue_redirect 1 } } use the default priority of 500 when HTTP_REQUEST priority 500 { if { $issue_redirect == 1 } { redirect to "https://www2.provisioning.na.blackberry.com" } }
- Chris_Graham_85
Nimbostratus
Thanks for the tips Joe. - dhaval_24359
Nimbostratus
For some reason event disable doesn't work for me. I have an multiple iRules that do 301 redirects. But if the first one (priority 10) has executed then in that one I call "event disable" and it shouldn't process any further iRules with the HTTP_REQUEST event. But it does. What am I doing wrong??? - hoolio
Cirrostratus
Can you post your rule(s) which aren't working along with a debug log statements showing both rules being triggered?
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