Forum Discussion

Al_Faller_1969's avatar
Al_Faller_1969
Icon for Nimbostratus rankNimbostratus
Oct 12, 2007

Multiple redirect/respond invocations not allowed

Hi All -

 

 

I have this rule that I have been fighting with for a few weeks now. Its basically a rule that gets automatically enabled on a couple of virts once a week during our maintenance window. I've rewritten it a few different times, expecting something was wrong with the logic, but it always fails with the error: Multiple redirect/respond invocations not allowed. This problem only started happening when I added the if clause the responds with a 500 error. Can someone review my rule below and see if I am doing something dumb?

 

 

Thanks

 

 

when HTTP_REQUEST {

 

if { not ([HTTP::uri] starts_with "/error/") } {

 

if { ![matchclass [IP::client_addr] equals $::Admin_Desktops] } {

 

if { ![HTTP::cookie exists "ADMINCOOKIE"] } {

 

if { [HTTP::uri] starts_with "/path/to/some/spot" } {

 

HTTP::respond 500

 

log "HTTP-500: [IP::client_addr] [HTTP::uri]"

 

} else {

 

HTTP::redirect "http://www.mysite.com/error/weekly-maintenance.html"

 

}

 

}

 

}

 

}

 

}
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Does the error occur on a virtual server that already has one or more iRules enabled which could also issue a redirect? Take a look at this thread (Click here) for some related info.

     

     

    Aaron
  • Posted By hoolio on 10/22/2007 4:26 AM

     

     

    Does the error occur on a virtual server that already has one or more iRules enabled which could also issue a redirect? Take a look at this thread (Click here) for some related info.

     

     

    Aaron

     

     

     

    Yes, actually - I didn't even think about that. I kinda assumed it would hit the first redirect and be done - obviously not the case. Whats the recommended approach here - bring them into a single irule?