Forum Discussion

JeffW_48472's avatar
JeffW_48472
Icon for Nimbostratus rankNimbostratus
May 13, 2013

iRules troubles

Traffic flow is as such:

 

 

Internet client browser: https://ps-qa-hc.domain.com (External DNS for this).

 

SSL on F5 for ps-qa-hc.domain.com.

 

Need this to go to:

 

http://c15088web4001.changedomain.c...ignon.html (Internal DNS for c15088.changedomain.com).

 

 

I'm not gettting the Event, Condition and actiosn correct. I've tried variations of:

 

 

when HTTP_REQUEST {

 

if {[HTTP::uri] equals "ps-qa-hc.learningcaregroup.com/"} {

 

HTTP::redirect "http://c15088web4001.cttlc.com:11104/HC90QA/signon.html"

 

}

 

}

 

  • Since you have external DNS pointing to the IP address of the virtual server, and assuming no other services are pointing to that virtual server, you probably don't need an iRule at all, or at least nothing that has to manipulate the host value. The client will access http://ps-qa-hc.learningcaregroup.com, hit the F5 virtual server, and get load balanced to the internal server (in a pool and listening on port 11104). The internal server's host name shouldn't be relevant unless you also need to pass a Host header.

     

     

    Now, if you simply need to redirect to "/HC90QA/signon.html" if the request URI is "/", then the following iRule (or something similar) should do what you need:

     

     

    when HTTP_REQUEST {

     

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

     

    HTTP::redirect "/HC90QA/signon.html"

     

    }

     

    }

     

     

    This will send a physical (302) redirect and adjust the client's address bar.