Forum Discussion
williehood_2622
Aug 23, 2018Nimbostratus
irule redirect pool uri http or https
I'm writing irule, I have two pools one for hhtps traffic and one for http traffic. I would like to have irule that based on uri "ex ; goes to http on pool1 any other port 80 redirects to https pool ...
Stanislas_Piro2
Aug 23, 2018Cumulonimbus
Your requirement seems like the example of SSL::disable wiki.
you can use this code:
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::uri]] {
"/content*" {
pool unsecure_80
set usessl 0
}
default {
pool secure
set usessl 1
}
}
}
when SERVER_CONNECTED {
if { $usessl == 0 } {
SSL::disable
}
}
Note : Code edited... default statement must be without quotes.
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