Forum Discussion
Raj_57800
Nimbostratus
Nov 24, 2008iRule for Http redirect
I have defined a irule to forward http request to be converted as https. But when any https request to the same server is not being forwarded. This is the irule
when HTTP_REQUEST { ...
hoolio
Cirrostratus
Dec 10, 2008You could consider changing the HTTP_REQUEST check to either send a redirect to https for all ports or add an else statement. As it is, if you added a default pool to the VIP and the request wasn't on 80 or 443 clients could access any other port on the default pool.
when CLIENT_ACCEPTED {
if {[TCP::local_port] == 443} {
HTTP::disable
pool test_pool
}
}
when HTTP_REQUEST {
if {[TCP::local_port] == 80} {
HTTP::redirect https://xxx.com
} else {
Reject the request
reject
}
}
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