Forum Discussion
Redirect from Http to Https Not working
- Aug 31, 2017
Hi
This is usually accomplished by having a second VIP using the same IP on HTTP with no pool associated but using the inbuilt iRule _sys_https_redirect
when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] } definition-signature mwyl4XlRKRMQc0prWs7RtpgPcNfocOKb+MaFwAnQgAuUZZyG68OaGZsOCN3poUOFdHOc6fk2XAdGRmTRiP/7BCT7thsOX5zLFzA1N1wcr57KWVzEZt3ezxVXn2Z974OmbWm7P5Lclcr7N3adrLJMWfyfPPVF1tUYn0IQPD2QNMmfbcbr1oCuO93n/5dn0s6/EacHZGG53hVibW7xQuJXdMtoQ6ArSZ4U3n4vCDTb6NLYbAj6PirVzKY2pcsWFHFUSVrphSFwERc8+0XGHUE6Cb3ihzygoZc2cQ5jk3frFY70MkDluPTShFRbHd7PlMPRezrfkVZVeUHA/iBPcYcD+w==
This means when traffic hits your HTTP VIP the iRule redirects them to the same host on HTTPS which in turn sends the traffic to your HTTPS VIP
Regards
Stuart
Hi
This is usually accomplished by having a second VIP using the same IP on HTTP with no pool associated but using the inbuilt iRule _sys_https_redirect
when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] } definition-signature mwyl4XlRKRMQc0prWs7RtpgPcNfocOKb+MaFwAnQgAuUZZyG68OaGZsOCN3poUOFdHOc6fk2XAdGRmTRiP/7BCT7thsOX5zLFzA1N1wcr57KWVzEZt3ezxVXn2Z974OmbWm7P5Lclcr7N3adrLJMWfyfPPVF1tUYn0IQPD2QNMmfbcbr1oCuO93n/5dn0s6/EacHZGG53hVibW7xQuJXdMtoQ6ArSZ4U3n4vCDTb6NLYbAj6PirVzKY2pcsWFHFUSVrphSFwERc8+0XGHUE6Cb3ihzygoZc2cQ5jk3frFY70MkDluPTShFRbHd7PlMPRezrfkVZVeUHA/iBPcYcD+w==
This means when traffic hits your HTTP VIP the iRule redirects them to the same host on HTTPS which in turn sends the traffic to your HTTPS VIP
Regards
Stuart
- Rakeshvela_3309Aug 31, 2017Nimbostratus
Thanks. It worked.
IT is working as intended. But I have a question. We have a GTM with say mytest.com FQDN and the pool we mapped say 1.1.1.1 has service port as 443.
Question: When we initiative a request to http://mytest.com ---> Why is the GTM accepting the request on port 80 when the service port is actually 443?
Thanks
- StuKirby_233899Aug 31, 2017Altostratus
Glad it worked.
Not sure I understand the question. The redirect VIP will accept communication on port 80 and should change the users session to HTTPS in the address bar. So http://mytest.com changes to https://mytest.com . Does this happen?
Thanks
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