Forum Discussion
LTM check http or https the request and make action to it
- Oct 17, 2014
Create a virtual server that listens on the specified IP address, Port 80, and attach that irule to it. Add a redirect for the HTTPS version in an else clause.
Pseudocode example:
if (uri_matches) { redirect to port 443 } else { accept request (do nothing) }You can also use a condition that checks for "TCP::local_port clientside" and reject if you get 80 (or whatever port your non-HTTP service is listening on).
Pseudocode example
if (TCP::local_port eq "80" and uri_matches) { redirect }I'm not aware of a way to ask the question "is this an SSL connection"? Others can chime in if they have better ideas.
Create a virtual server that listens on the specified IP address, Port 80, and attach that irule to it. Add a redirect for the HTTPS version in an else clause.
Pseudocode example:
if (uri_matches) {
redirect to port 443
} else {
accept request (do nothing)
}
You can also use a condition that checks for "TCP::local_port clientside" and reject if you get 80 (or whatever port your non-HTTP service is listening on).
Pseudocode example
if (TCP::local_port eq "80" and uri_matches) {
redirect
}
I'm not aware of a way to ask the question "is this an SSL connection"? Others can chime in if they have better ideas.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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