Forum Discussion
Joe_Pipitone
Apr 07, 2010Nimbostratus
Combining 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...
Joe_Pipitone
Apr 07, 2010Nimbostratus
I appreciate your response.
I've figured out how to do this, however now I'm having trouble combining two switch statements into one - can anyone help with this syntax? If I don't have the HTTP::path in there, the iRule won't pass the search string, for example info.aspx?id=1
when HTTP_REQUEST {
switch [string tolower [HTTP::path]] {
"/info.aspx" {
HTTP::redirect "http://subdomain.oursite.com/default.aspx?[HTTP::query]"
}
switch [string tolower [HTTP::uri]] {
"/login/default-login.aspx" {
HTTP::redirect "https://oursite.com[HTTP::uri]"
}
"/forms/buy.aspx" {
HTTP::redirect "https://oursite.com[HTTP::uri]"
}
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