Forum Discussion

MrGlass_204919's avatar
MrGlass_204919
Icon for Nimbostratus rankNimbostratus
Aug 14, 2015

HTTPS Redirect

Hey Folks,

 

Im tyring to setup a simple https redirect but am running into the following:

 

I have two vips: vip_https_xxxx , vip_http_xxxx.

 

vip_https_xxxx IP: xxxx port: 443 SSL: Client SLL Prof: xxx Resources: pool_http_xxx

 

Pool_http_xxx IP: xxxx port 80

 

vip_http_xxxx IP: xxxx port: 80 HTTP Profile: http Irule: when HTTP_REQUEST { HTTP::redirect https://[HTTPS::host][HTTP::URI]

 

However the redirect is not working. Even worse the vip_https_xxxx is not even being hit, at all when looking at the statistics.

 

any one know why and what to do? The configuration is identical to another configuration we have and that one works. This one fails and i dont know why.

 

Thanks!

 

2 Replies

  • Hi,

     

    HTTPS::host is not a F5 variable...

     

    the default _sys_https_redirect irule will do what you want... no need to create your own irule!

     

  • Hi Stainslas,

     

    That was a typo! It should be:

     

    when HTTP_REQUEST {

     

    HTTP::redirect https://[HTTPS::host][HTTP::URI]

     

    }

     

    The problem is, using this irule or the default _sys_https_, is that the VIP isnt being hit. There is 0 inc traffic, not irule being hit etc. Im trying to figure out why the vip isnt being hit. I have all the settings right (same as the https vip excpet the port to 80).

     

    thanks.