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...
swo0sh_gt_13163
Altostratus
Apr 30, 2015I would suggest to use a string based data group if it is going to be more than a few, would be easy to manage. However following is a sample snippet can be helpful too.
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]
}
}
Hope this helps.
Ahmad_03_151082
Nimbostratus
Apr 30, 2015thank you so much for your help....
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