Forum Discussion

Sheldon_17198's avatar
Icon for Nimbostratus rankNimbostratus
Feb 24, 2011

Redirect all HTTP traffic to HTTPS://domain/owa

Morning All.



I am trying to write a iRule to redirect all traffic hitting a virtual server listening on port 80 to a



I have been reading through some examples so wanted to sound out my code (little green when it comes to iRules).






HTTP::redirect ""






So when a user goes to its is redirected to (I am happy that any request to is redirected to the https url).



If anyone can shine some light on what I have, if you can explain it if I am wrong as well.



Thank you very much for reading and more thanks if you help me out :-)








1 Reply

  • Welcome to the forums.

    First of all, it's imperative to use the right "event" for your iRule. In this case, you want to use HTTP_REQUEST. HTTP_RESPONSE happens once the F5 LTM receives a response from your pool members.

    Give this a shot. It'll send whatever the user requests to the same URL but over HTTPS. If instead you'd like to change the hostname or URI, simply change it below. üòâ

    when HTTP_REQUEST {
       HTTP::redirect "https://[HTTP::host][HTTP::uri]" }