Forum Discussion
tobulos1_310660
Nimbostratus
Feb 17, 2017If port 80 then HTTP else HTTPS
Hi!
We have an iRule that looks like this:
when HTTP_REQUEST {
if {[TCP::local_port] == 80 } {
pool test-pool
} elseif {[TCP::local_port] >= 3000 && [TCP::local_port] <= 3999 } {
...
Feb 17, 2017
If you are talking about HTTP of HTTPS to what context are you referring? For the serverside context you could use the following iRule. You will need to add a SSL server profile to the virtual server.
when HTTP_REQUEST {
if {[TCP::local_port] == 80 } {
SSL::disable serverside
pool test-pool
} elseif {[TCP::local_port] >= 3000 && [TCP::local_port] <= 3999 } {
pool test1-pool
} elseif {[TCP::local_port] >= 4000 && [TCP::local_port] <= 4999 } {
pool test2-pool
} elseif {[TCP::local_port] >= 5000 && [TCP::local_port] <= 5999 } {
pool test3-pool
} else {
drop
}
}
If you are referring to the clientside context, I think it would be better to create two seperate virtual servers; one that is handling the HTTP traffic, and one that handles the HTTPS traffic.
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
