Forum Discussion
iRules HTTP Redirect to HTTPS
I have configured an irule for http to redirect to https as below but it is not working any advice on how to resolve appreciated.
https works. http with redirect does not work
irule name is Redirect-http
when HTTP_REQUEST { HTTP::redirect https://[HTTP::host][HTTP::uri] }
HTTP Config
ltm virtual Servers-VS-80 { destination 172.19.18.230:http ip-protocol tcp mask 255.255.255.255 pool Servers-443 profiles { clientssl { context clientside } http { } serverssl { context serverside } tcp { } } rules { Redirect-http } vlans-disabled }
ltm pool Servers-443 { members { Server1:https { address 172.19.18.100 session monitor-enabled state up } Server2:https { address 172.19.18.200 session monitor-enabled state down } } monitor min 1 of { https } }
HTTPS Config
ltm virtual Servers-VS-443 { destination 180.38.18.230:https ip-protocol tcp mask 255.255.255.255 pool Caplin-443 profiles { company1.com { context clientside } company1.co.uk { context clientside } Company2.com { context clientside } Server1 { context serverside } Server2 { context serverside } Server3 { context serverside } server4 { context serverside } tcp { } } vlans-disabled }
ltm pool Servers-443 { members { Server1:https { address 172.19.18.100 session monitor-enabled state up } Server2:https { address 172.19.18.200 session monitor-enabled state down } } monitor min 1 of { https } }
5 Replies
- Stefan_Klotz
Cumulonimbus
Hi Michael,
that's pretty easy, you have configured SSL-profiles for your HTTP-VS. This is not working at all, even without your redirect iRule. Please remove both SSL-profiles and also the default pool is not required for your HTTP-VS.
Ciao Stefan :)
- michaelw3
Nimbostratus
Thats worked thanks. been away from F5 for a while :-)
- together_183451
Nimbostratus
For http to https does it required ssl certificate?
- nathe
Cirrocumulus
Not on the http VIP but yes on the https one
- together_183451
Nimbostratus
Hi i have the same issue i have configured the below rule but it's not working when HTTP_REQUEST { HTTP::redirect https://[HTTP::host][HTTP::uri] }
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