Forum Discussion
thashack00_9151
Historic F5 Account
Thanks Joe. I am terminating SSL on the VIP so we should be good.
I have a couple additional questions:
1. What does the ! signify in front of the first condition? Does this read "if the host starts with www. than do nothing, otherwise add the www?" I am new to iRule writing so just want to be certain before implementing!
2. Is this a better way to go rather than using HTTP class? I am under the impression that this gets converted when upgrading to 11.4.x but I was trying to get in front as it is critical that our app sees www.hostname.net as opposed to hostname.net. I can't lose that functionality!
Thanks!
Jeff
Oct 07, 2013
The "!" is a NOT operator which gives the negative on the comparison. You can also use the keyword "not" if you want. For this example, it would read: "if HTTP::host does not start with 'www.' and HTTP::host does contain 'hostname.net', then redirect to https://www.[HTTP::host][HTTP::uri]".
As for going with a HTTP::class, I'd suggest going that route if you were certain your platform supported it, but with the upgrade, if I were you, I'd get the iRule working and head that issue off at the pass and not rely on an upgrade doing it for you. I'm not sure what the upgrade process does but I do recall hearing some customers having to do some work to get their class profiles migrated post upgrade.