Forum Discussion

Nick_Montel's avatar
Nick_Montel
Icon for Nimbostratus rankNimbostratus
Feb 28, 2017

HTTP_RESPONSE event not getting triggered after a Redirect

I have the following iRule. The HTTP_REQUEST successfully redirects but the HTTP_RESPONSE never gets executed. I have tried adding the iRule HTTP_Response to both the Source and Destination Virtual Servers but nothing is ever logged showing the message in the HTTP_RESPONSE. How do I get the HTTP_RESPONSE event to be triggered?

 

when RULE_INIT { set ::mylearning_hostname "mylearning.corp.dom"

 

set ::elearning_hostname "testelearning.corp.dom" set ::root_redirect_uri "/ADKAR/ADKAR.htm" set ::proxy_site_debug 1

 

}

 

when HTTP_REQUEST { log local0. "REQUEST TRIGGERED" if { $path starts_with "/testelearning" } { HTTP::redirect "https://$::elearning_hostname$::root_redirect_uri" } }

 

when HTTP_RESPONSE {

 

log local0. "RESPONSE TRIGGERED" }

 

1 Reply

  • This works as it should work. When you do a HTTP::redirect within a HTTP_REQUEST it will never see a HTTP_RESPONSE event, because the original HTTP request will never reach a pool member. One needs a pool member to respond, to generate a HTTP_RESPONSE event.