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, 2015Hello Ahmad,
You may implement an iRule such as following.
when HTTP_REQUEST {
if {!([HTTP::uri] contains "pubportal")}{
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
You can change the "pubportal" with any URI or string you want to match and exclude from being redirected to HTTPs. I am sure there must be other alternatives available to achieve the same with more optimal iRule.
I hope this would be helpful.
Cheers! Darshan
- Ahmad_03_151082Apr 30, 2015
Nimbostratus
Thank you so much what if i want to add another 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