Forum Discussion
Andrea_Knapp_28
Nimbostratus
Oct 19, 2007REdirect HTTP -> HTTPS based on IP
In Version 4.5 I had a simple rule that went as follows:
if (server_addr == 11.11.11.11) {
redirect to "https://www.yourdomain.com/%u"
}
else {
discard
} ...
hoolio
Cirrostratus
Oct 24, 2007Hi,
What exactly are you trying to accomplish? I'm guessing you had the 4.5 rule listed above configured on an HTTP virtual server with an IP of 11.11.11.11. You were using that rule to redirect all requests made via HTTP to HTTPS. Is this accurate?
If so, you can use this rule to do the same in 9.x:
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}Aaron
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
