For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

dlogsdonmd's avatar
dlogsdonmd
Icon for Nimbostratus rankNimbostratus
Jul 16, 2019

iRule - Add HTTPS to iRule

I have the below rule applied on my HTTP VIP, it only redirects traffic accessed over HTTP. How can I update this rule to allow redirects for both HTTP and HTTPS so I can apply the same rule to both my HTTP and HTTPS VIPs?

 

when HTTP_REQUEST { 

if { [HTTP::uri] contains "/idestudy" }{ 

 

HTTP::redirect "http://www.domain.com/TVT/Home/idestudy.aspx" 

 

} else { 

 

HTTP::redirect https://www.domain.com/webncdr/tvt/publicpage

 

}

}

 

Thanks in advance.

 

Diane

2 Replies

  • You'll need to put a redirect iRule on your HTTPS VIP. Where is www.domain.com hosted, is it another VIP? Just be careful you don't get stuck in a redirect loop.

  • That's what I thought. We have the iRule on our HTTPS VIP now, we were just trying to eliminate VIPs that we didn't really need. Thanks for the reply.