Forum Discussion
daveclark_20228
Nimbostratus
Jun 10, 2009How do i convert this irule to use HTTPS instead of HTTP
Hello
I have this 2 irules , one is to redirect on port and one to redirect on uri. Both are to do the same thing .
I have 2 apps both listen out on https , and terminate ssl at the LTM and forward to a TCP one app goes to 81 and one goes to 90 on the same back end servers.
I have the concept for the irule for HTTP , but how do i get these irules to work for HTTPS.
irule 1
when HTTP_REQUEST {
set redirectPort [getfield [HTTP::host] ":" 2]
log local0. "port: $redirectPort"
if { $redirectPort equals "90" }{
pool EDG-LIVE-PRE-CLT-90-TEST1-PL
} elseif { $redirectPort equals "81" }{
pool EDG-LIVE-PRE-81-TEST1-PL
} else {
reject
}
}
irule 2
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/nexusclient/login.aspx" } {
pool EDG-LIVE-PRE-81-TEST1-PL
} elseif { [HTTP::uri] starts_with "/site/00000013/en-GB/Login.aspx" } {
pool EDG-LIVE-PRE-CLT-90-TEST1-PL
} else {
reject
}
}
Many thanks for your time.
P.S i am not a programmer and very new to irules
- jeff_mccombs_47
Nimbostratus
Wait.. I'm confused. - The_Bhattman
Nimbostratus
Hi Ovdemonz,when HTTP_REQUEST { switch -glob [HTTP::host] { "*.site.com" { HTTP::redirect "https://www.site.com:4343" } default { pool pool_A } } }
- The_Bhattman
Nimbostratus
Hi DaveClark15, - sunil_ferrao_19
Nimbostratus
thanks a lot Jeff
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