Forum Discussion
Ahmad_03_151082
Nimbostratus
Apr 29, 2015HTTP to HTTPs exclude URLs
Hello
I am facing problem with my iRule which is redirect HTTP to HTTPs
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host][HTTP::uri]] {
"xyz.com/pubportal/something" -
"xy...
Zeeshan_Ahmad_1
Nimbostratus
May 04, 2015Just one correction to the above iRule, you need to mention the HTTP::uri every time while using "or/and" for comparing the values. And again best practice is to use data group for multiple values
when HTTP_REQUEST { if {!([HTTP::uri] contains "pubportal" or [HTTP::uri] contains "WebServiceVehicleRegistration" or [HTTP::uri] contains "abc")} {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
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