Forum Discussion
R__Niznik
Employee
Nov 04, 2019iRule redirect HTTPS to different VS
Looking for a iRule that forwards different request to different vip example:
https://sub1.domain.com forward to vs1
https://sub2.domain.com forward to vs2
http://sub3.domain.com forward to vs3
Thanks
- PeteWhite
Employee
when HTTP_REQUEST { switch -- "[SSL::mode]-[HTTP::host]" { 1-sub1 .domain.com { [virtual vs1] } 1-sub2.domain.com { [virtual vs2] } 0-sub3.domain.com { [virtual vs3] } } }
A few points - maybe think about using ltm policies for this kind of routing.
More importantly, how do you expect to receive http and https traffic on the same virtual server?
}
- R__Niznik
Employee
for http request I will use VS:80 and with iRule that changes http to https
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
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