Forum Discussion
ppphatak_127926
Nimbostratus
Apr 21, 2005substr doesnt work as expected
This is simple rule I wrote. I have a virtual server on port 80 and a proxy for 443, both pointing to this rule.
I was expecting when url is https, it would go to yahoo and when its not...
Apr 22, 2005
There is nothing wrong with your script. The http_host contains the FQDN portion of the URL. Since it contains only the FQDN, it will never match your string compares to the protocol.
Per the 4.6.2 documentation:
The http_host variable specifies the value in the Host: header of the HTTP request. It indicates the actual FQDN that the client requested. Possible values are a FQDN or a host IP address in dot notation.
So, a uri splits out like this:
http://{http_host}{http_uri}
Unfortunately, I don't see a simple way to pick out the protocol portion of the whole URL from within iRules. I'll ask around with the other rules folks here on the 4.x team to see if they have another workaround but at this point I believe that you'll have to have a separate rule for your http and https VIPs.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects