Forum Discussion

David_Y_20509's avatar
David_Y_20509
Icon for Nimbostratus rankNimbostratus
May 21, 2010

HTTP Redirect OWA without SSL

Hello, I am new to the F5 iRules. I am trying to load balance the Exchange OWA. Since it is internal, we are not using SSL. I have used the following iRule from the deployment guide, but modified to remove the https. It appears to be looping.

 

 

when HTTP_REQUEST {

 

HTTP::redirect "http://[HTTP::host]/owa"

 

}

 

 

Yet, when I use the following rule with a static IP address, it works just fine.

 

 

when HTTP_REQUEST {

 

HTTP::redirect "http://10.0.0.24/owa"

 

}

 

 

I have been working with the support from F5, but we seem to be going around in circles and he doesn't seem to know what the issue is. Going on day 3. Does anyone know why it is looping? Is there a way to redirect the traffic without changing the URL address from the end users perspective? I hope that makes sense.

 

 

Thank you in advance.

 

 

4 Replies

  • Try this out:

     

     

    when HTTP_REQUEST {

     

    if {[HTTP:uri] equals "/"} {

     

    HTTP:redirect "http://[HTTP::host]/owa"

     

    }

     

    }
  • Try this out:

     

     

    when HTTP_REQUEST {

     

    if {[HTTP:uri] equals "/"} {

     

    HTTP:redirect "http://[HTTP::host]/owa"

     

    }

     

    }
  • Where I work we try to write what we call "any.any" iRules. Meaning that we can apply it to any Virtual Server and get the same result.

    This is our HTTPS to HTTP Redirect iRule. It will get the [HTTP::host] and [HTTP::uri] of whatever you apply it to and redirect it to HTTP.

    
    when HTTP_REQUEST {
      HTTP::redirect http://[getfield [HTTP::host] ":" 1][HTTP::uri]
    }
    

    The key is where you apply the iRule. Do NOT apply an HTTPS to HTTP Redirect to your HTTP Virtual Server (only your HTTPS Virtual Server) or you will create an endless loop.
  • Hello David,

     

     

    Joe Pruitt wrote an excellent post back in 2005 that provides good examples of redirecting traffic without changing/updating the users browser. He refers to it as transparent header modification. Basically you scan for the uri in question, when your condition is met you then pass a different uri to the backend server and the client never knows the difference.

     

     

    Here is a link to that:

     

    http://devcentral.f5.com/weblogs/joe/archive/2005/07/27/ModifyingUriWithoutRedirect.aspx

     

     

    I am not familiar with your network setup, BUT the way we do our OWA traffic is not by setting up an iRule like that. What we do is have a simple string iRule that looks for the "/owa/" in the URI and when it sees it, it just sends the traffic over to the pool of OWA servers. What do you have setup as your default pool for that VIP?