Forum Discussion
David_Larsen
Jul 16, 2014Employee
The 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]"
}
}
}