Forum Discussion

Dali_Chauhan_33's avatar
Dali_Chauhan_33
Icon for Nimbostratus rankNimbostratus
Jun 06, 2018

https to https redirection along with http to https redirection iRule

we have iRule in which http://abc gets redirected to https://abc.xyz.opj.com

 

but we would also like to get https://abc redirected to https://abc.xyz.opj.com

 

Please suggest how to get the redirection to https://abc.xyz.opj.com if user type FQDN **https://abc in browser.

 

here the VIP config

 

abc_443 pool_80 server_1:80 server_2:80

 

abc_80 irule_https_redirection irule_https://abc.xyz.opj.com

 

1 Reply

  • Hi,

    So you need 2 irule, one by VS like that:

    abc_443 (hostname redirection) -->

    when HTTP_REQUEST {
        if {[string tolower [HTTP::host]] equals "abc"}{
                HTTP::redirect "https://abc.xyz.opj.com[HTTP::uri]"
            }
        }
    }
    

    abc_80 --> irule_https_redirection

    Keep me in touch if it's clear.

    Regards