Forum Discussion
habib_Khan
Nimbostratus
Aug 18, 2016Irule to exempt redirection for connections from specific IP/range and redirect all other traffic to https
I am using below irule, my requirement is when request comes from specific set of IP or range of IP redirection should not happen and all other connections/requests should get
https redirection. Kin...
Stefan_Klotz
Cumulonimbus
Aug 18, 2016Hi Habib,
I assume you have two virtual servers, one for port 80 and the other for port 443. And that each has a default pool configured. If so, then the following iRule should work:
when HTTP_REQUEST {
log local0. "Client: [IP::client_addr]"
if { ![class match [IP::client_addr] contains cdm_test_range] } {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
Hope that helps.
Ciao Stefan 🙂
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