Forum Discussion
iRule Help - matchclass and redirect to HTTPS
I have two examples of an iRule that I am migrating from 10.x to 11.4.1. Respectfully requesting assistance on how to properly format these iRules:
when HTTP_REQUEST {
Check requested host header (set to lowercase)
if { [class match [HTTP::host] equals "Datagroup1" ] } {
pool Datagroup1_pool
} elseif { [class match [HTTP::host] equals "Datagroup2" ] } {
pool Datagroup2_pool
}
} and
when HTTP_REQUEST {
Check requested host header (set to lowercase)
if { [class match [HTTP::host] equals "Datagroup3_IIS" ] } {
pool Datagroup3_IIS_pool
} elseif { [class match [HTTP::host] equals "Datagroup4" ] } {
pool Datagroup4_pool
}
}
These iRules works on HTTP but when I am trying to force to HTTPS... it is not working. Any assistance is warmly appreciated.
1 Reply
- Kevin_Stewart
Employee
Two things:
-
The syntax is technically correct for v10 and v11, though you don't have to put the data group name in double quotes.
-
If the event is triggered at all, then SSL offload has already happened. You of course must apply a client SSL profile to the VIP to offload the client side SSL if you want to be able to process HTTP traffic.
-
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