Forum Discussion
Joe_Pipitone
Nimbostratus
Apr 07, 2010Combining various iRules
I have an interesting issue - I saw in the F5 traffic logs that an iRule was triggering an error - and I believe the problem is because I have 5 iRules applied to a virtual server, all of which do dif...
hoolio
Cirrostratus
Apr 08, 2010Maybe this?
when HTTP_REQUEST {
switch [string tolower [HTTP::path]] {
"/info.aspx" {
HTTP::redirect "http://subdomain.oursite.com/default.aspx?[http::query]"
}
"/login/default-login.aspx" {
HTTP::redirect "https://oursite.com[HTTP::uri]"
}
"/forms/buy.aspx" {
HTTP::redirect "https://oursite.com[HTTP::uri]"
}
}
}
I think it's better to try to combine all of the iRules which could send a redirect into one as this forces you to consider each piece of logic together. Disabling the HTTP_REQUEST event can be problematic if the client could make multiple HTTP requests over the same TCP connection. If they do, and you disable the HTTP_REQUEST event, no other HTTP requests are processed in the iRule for the duration of the client's TCP connect to the VIP.
Aaron
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