Forum Discussion
Vinsanity904_19
Mar 17, 2015Nimbostratus
HTTP to HTTPS://wwww iRule
Hello,
I have a pair of physical F5's sitting in front of an IIS farm. My understanding is it's better/easier to use iRules instead of IIS Re-write rules for what I'm trying to do.
Can some...
Michael_Jenkins
Mar 17, 2015Cirrostratus
With an irule, you can do that pretty easily. Just tolower the HOST and if it's not redirect. Something like this. It won't test for https (I assume you're vip only accepts 443 (and you can create an 80 vip that automatically redirects everything to https using the built-in
_sys_https_redirect
irule or a Local Traffic Policy).
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"www.url.com" {
Do nothing
}
default {
HTTP::redirect "https://www.url.com[HTTP::uri]"
}
}
}
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