Forum Discussion
Teffany_142554
Nimbostratus
Aug 24, 2016irule uri preservation for direct https requests
I need to preserve 3 uri but redirect all other requests. I created the following rule, which works on the http vip, but breaks the site if also applied to the https vip. What adjustment(s) am I miss...
Stanislas_Piro2
Cumulonimbus
Aug 24, 2016Hi,
If you apply this irule on HTTPS VS, it will loop for the three first URLs...
when HTTP_REQUEST {
if { ([HTTP::uri] equals "/a/b/c.asp") or ([HTTP::uri] equals "/d/e/f.txt") or ([HTTP::uri] equals "/x/y/z/") } {
if {[TCP::local_port] equals 443} {
return
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
} else { HTTP::redirect "https://www.mywebsite/apply" }
}
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