iRule 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.mysite.com on port 443 on IP 44.33.22.10
2.) Another separate VS setup for HTTP for home.mysite.com on port 80 on the same IP of 44.33.22.10 with an iRule that is basically an HTTP to HTTPS redirect so that any HTTP/80 traffic that hits my site automatically gets redirected to HTTPS.
Basically what I tried to do is create another iRule to say if anyone wants to go to home-nonSSL.mysite.com and stack it before the HTTP-->HTTPS redirect iRule on the HTTP/80 VS everything fails. The whole VS is basically unusable. Here are my iRules:
HTTP VS (44.33.22.10)
**** FIRST IRULE, URI MATCH TO POOL IRULE *****
Non-SSL Site Pool
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { home-nonSSL.mysite.com { pool MYSITE_NON-SSL_Pool-80 } } }
**** SECOND IRULE, HTTP-->HTTPS REDIRECT ****
when HTTP_REQUEST { HTTP::redirect https://[HTTP::host][HTTP::uri] }
Regards,
James