rob_miller_7792
Nov 01, 2007Nimbostratus
Nested iR not working?
I am trying to implement a nested iRule, and was hoping to get some help on my syntax.
I am trying to accomplish 2 things. First, if the user enters mydomain.com or x.mydomain.com then I need to redirect them to www.mydomain.com. this is keep the cookies consistent on the customers machine.
second, I am also using this iRule to redirect to a secure connection for any secure pages on our site.
I have 2 iRules that accomplish this on their own, but whenever I try to combine them the browser just clocks, so I assume it is stuck redirecting over and over. here is the code I have tried that seems to me like it should work:
if (http_host contains one of ValidDomains){
if (substr(http_uri, 1, '?') contains one of SecurePages) {
redirect to "https://%h/%u"
}
else {
use pool mywebfarm
}
}
else {
redirect to "http://www.mydomain.com/%u"
}
Thanks in advance for any advice...