Forum Discussion

Rob_Higginbotha's avatar
Rob_Higginbotha
Icon for Nimbostratus rankNimbostratus
Apr 08, 2016

Help with redirect https

I wrote this iRule below and it works great for the most part but, when someone types https://iam.company.com it won't redirect. It only redirects http://iam.company.com to https://iam.company.com:8443/aveksa/main. Is there a way to get it to redirect https as well? Thanks for your help!

 

when HTTP_REQUEST { if { [string tolower [HTTP::host]] eq "iam.company.com" } then { if { [HTTP::uri] eq "/" } then { HTTP::redirect "https://iam.company.com:8443/aveksa/main" } } }

 

2 Replies

  • Josiah_39459's avatar
    Josiah_39459
    Historic F5 Account

    I'm guessing you have two vips, one on 80 and one on 443 and this irule is on the 80 vip. If you put it on BOTH the 80 vip and the 443 vip, you will get the behavior you desire.