Forum Discussion

Muhammad_Irfan1's avatar
Feb 18, 2015

automatic redirect problem.

I have a one arm model.

 

Client --> http --> F5 --> http -- server

 

This works fine.

 

Client -->https -->F5 -->http --server

 

I try to open the link with https but it opens with http url. When i disabled the http VS on F5 then tried with https then page was not opening at all.

 

What could be the problem and how to resolve this? Why url is redirected to https to http automatically? I want https to remain https.

 

Please help

 

6 Replies

  • To clarify, do you have 2 VIPs for the same IP (one http and one https) that both go to the same pool using http?

    What's your VIP config(s) look like? With the CLI, you can do something like

    tmsh list ltm virtual VIRTUAL_NAME
    to get the config. Can you past the config (sanitize as needed) here to help debug?

  • You web server is most likely generating the links with an absolute path. You have a few options to help with that if your devs can't change the link to relative easily. You can just have a redirect setup on 80 that redirects everything over to HTTPS, enable your site to use HSTS which will tell modern browsers to never even try going to HTTP and always go to HTTPS for the domain, or you can use stream profile to rewrite all the respons links coming from the server to https.

     

    • Muhammad_Irfan1's avatar
      Muhammad_Irfan1
      Icon for Cirrus rankCirrus
      Yes sir you are right about redirecting each response from 80 to 443. I am using version 11.2.1. My VIP,s are 10.50.180.14:80 and 10.50.180.14:443. Sir can you please make me a simplest iRule for this. I will be grateful.
  • You web server is most likely generating the links with an absolute path. You have a few options to help with that if your devs can't change the link to relative easily. You can just have a redirect setup on 80 that redirects everything over to HTTPS, enable your site to use HSTS which will tell modern browsers to never even try going to HTTP and always go to HTTPS for the domain, or you can use stream profile to rewrite all the respons links coming from the server to https.

     

    • Muhammad_Irfan1's avatar
      Muhammad_Irfan1
      Icon for Cirrus rankCirrus
      Yes sir you are right about redirecting each response from 80 to 443. I am using version 11.2.1. My VIP,s are 10.50.180.14:80 and 10.50.180.14:443. Sir can you please make me a simplest iRule for this. I will be grateful.