Forum Discussion
HTTPS Redirect and HTTP Host Forward 1 Policy
Hi,
I'm new to using F5 Big-IP LTM. We've recently purchased a pair of i2000 updated to version 15.0.1 to act as reverse proxies. I've setup the devices and created basic test virtual servers that can redirect http and https sites. I've also got http to https redirecting. I've primarily been looking at using policies for doing all of this.
Now although I've got a http website or a https website or http to https redirect working individually, I can seem to get them working together.
Simply, what I'm trying to achieve is, when someone goes to our site, it does the http to https redirect (if required) and then redirects them to a pool of servers based on the http host condition. I've added the http host condition because my eventual goal would be to have 1 virtual server which has redirects you to different pools depending on the http host. As I have this condition in the policy, I've not specified a pool on the virtual server.
I've got a policy setup with the strategy of all. The basically has the condition http host full string is domainname.com at request time, then perform first action, redirect to location "tcl:https://[getfield [HTTP::host] : 1][HTTP::uri]" at request time. Then perform 2nd action redirect to pool. I've also ticked the box in options for for SNAT and selected Auto Map.
I've tried this with 2 different policies also , one for the http to https redirect and one for the forward based on http host name. Both assigned to the virtual server but it still didn't work.
I know I could probably do all this with iRules and more but I would've liked to get this working through policies before moving onto iRules.
Hope that makes sense and you can point me in the right direction.
Thanks
Praf
- youssef1
Cumulonimbus
Hi,
So indeed you can use ltm policy in a simple way:
First rule: redirect http to https
syntaxe for location can be:
tcl:https://www.domain.com[HTTP::uri]
tcl:https://[HTTP::host][HTTP::uri]
second rule: FW traffic to a pool will be:
You can add all rule needed for other app in order to FW in the right pool depending to the host name.
More you can disable serverssl profil in server side (in your ltm policy in the app rule) if your pool in not ssl (when you want to do offloadssl).
regards
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