Forum Discussion
katekattar_4936
Nimbostratus
Jun 01, 2009irule SSL Redirect
Hi All,
I have a fairly simple irule to write but can only get half of it correct. I want to send all traffic to a certain URI to HTTPS as well as ensuring all other uri's are not accessed us...
Colin_Walker_12
Jun 01, 2009Historic F5 Account
So you want to redirect them if their URI starts with that string, and then force redirect them back if it doesn't?
So it sounds like what you're looking for is:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/paymentoptionshome/payments" } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} elseif { (!( [HTTP::uri] starts_with "/paymentoptionshome/payments")) and ([TCP::local_port] == 443) } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
Colin
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
