Forum Discussion
Joe_Pipitone
Nimbostratus
Oct 05, 2015Bypass SSL redirect if URI is....
I have 2 set of iRules that I'd like to combine into 1, however I'm unable to apply the logic without the result ending up in a loop.
The end result needs to be - if the URI is "/articles/2015/09/0...
Robert_Teller_7
Oct 05, 2015Historic F5 Account
Give the following a try
when HTTP_REQUEST {
if { [TCP::remote_port] eq 80 && !([string tolower [HTTP::uri]] starts_with "/articles/2015/09/09/something.aspx") }
{
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
elseif { [TCP::local_port] eq 443 && [string tolower [HTTP::uri]] starts_with "/articles/2015/09/09/something.aspx" } {
HTTP::redirect http://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
else {
return
}
}
- Joe_PipitoneOct 05, 2015
Nimbostratus
This works partially - it doesn't force SSL if the user goes to another article - it should only bypass redirecting to SSL if it IS /articles/2015/09/09/something.aspx. Everything else should be forced to https.
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
