Forum Discussion

Nick_67001's avatar
Nick_67001
Icon for Nimbostratus rankNimbostratus
Aug 06, 2008

client redirection from http to https

Hi,

 

 

I've the following problem to solve :

 

 

Client must come in HTTPS to the BIG-IP and BIG-IP -> Server in HTTP. My Virt server is in HTTPS.

 

We would like that any client coming with http://www.acb.com that the BIG-IP respond to the client to uses https://www.abc.com

 

 

Something like that :

 

 

If http_request = http://www.abc.com

 

then HTTP response = https://www.abc.com

 

 

Somebody could help me to translate that in an Irules...?

 

 

Thanks a lot in advance.

 

 

Nick

3 Replies

  • Hi,

    You can do something like this:

     
     when HTTP_REQUEST { 
       HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] 
     } 
      
     
  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    Also, there's a freebie tool for generating redirection iRules of all sorts here:

     

     

    http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=233