Forum Discussion

Daniel_58687's avatar
Daniel_58687
Icon for Nimbostratus rankNimbostratus
Nov 12, 2007

Redirecting http to https over dns (host header)

Hello,

 

i have a problem with mit iis.

 

 

I have one ip with any host header domains.

 

 

i will redirect web request to http://www.testing.com redirecting

 

to https://www.testing.com

 

 

My problem, i don´t redirecting the ip because the other domains

 

not redirecting to ssl

 

 

I have a F5 BIG-IP 1500 and hope this is possible with iRules!

 

 

thanks

 

 

Masterleads

1 Reply

  • Hi,

    Here's an example that redirects requests which match a specific host header to the same Host and URI over https:

    
    when HTTP_REQUEST {
        check if Host header is www.testing.com
       if {[string tolower [HTTP::header value Host]] eq "www.testing.com"}{
           Redirect to same Host and URI over https
          HTTP::redirect https://[HTTP::host][HTTP::uri]
       }
    }

    Aaron