Although iRule is now working fine on both HTTP and HTTP virtual servers I have found a slight issue.
When i stay on the same VIP the irule works fine
Example:
1) If uri is http://www.test1.com and irule is set to replace host to www.test2.com and change uri to /index.html - i get re-written and sent to correct page but browser still has http://www.test1.com - This is good and is working as designed
2) if i try the same as 1) but replace protocol with https and change uri to /secure (i have another irule that picks up that /secure should be https and forces all traffic to HTTPS virtual server) this works as expected e.g. requested uri is https://www.test1.com/secure - gets re-written to https://www.test2.com/secure and browser retains https://www.test1.com/secure
However....
3) If i enter http://www.test1.com/secure - i get redirected to https://www.test2.com/secure and browser shows this in address bar.
I am guessing it is something to do with the other irules i have - but just wondered whether anyone had seen something like this previously?