Forum Discussion
Cribby_130403
Nimbostratus
Jul 16, 2014iRule URI to Pool before iRule with HTTP to HTTP Redirect
Hello,
I am trying to create and stack a simple set of iRules but I don't seem to be getting the desired results. Basically I have the following setup.
1.) A VS setup for HTTPS for home.m...
David_Larsen
Employee
Jul 16, 2014The problem you are having is both rules are processing on the HTTP_Request and therefore both end up making a decision. The first decides to use the non-ssl pool. The second is a redirect which is much more immediate to the request never goes to the pool. You need logic around your second irule to say if it isn't the non-ssl site then redirect to SSL. Or you could combine both rules as this:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"home-nonssl.mysite.com" {
pool MYSITE_NON-SSL_Pool-80
}
"default" {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
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