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 { ...
Nicolas_Menant
Employee
Dec 09, 2008
when HTTP_REQUEST {
if {[TCP::local_port] == 80} {
HTTP::redirect https://xxx.com } {
else {
pool test_pool
}
}
This iRule won't work for HTTPS since you didn't specify a Client SSL profile. You cannot use when HTTP_REQUEST for HTTPS request in this case.
you should then do something like this:
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
}
}
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