Forum Discussion

JD_Tomzak_40166's avatar
JD_Tomzak_40166
Icon for Nimbostratus rankNimbostratus
Feb 21, 2019

Undefined procedure error in my Irule

In advance, please forgive my non programmer lameness. This Irule seems like it should work but I get errors when I try to save. when HTTP_REQUEST { if { ([HTTP::method] equals "HEAD") } {

 

forward } else { HTTP::redirect “https://xxxx.xxxxxxx.com” } } Do I have something on the wrong line or a close in a bad spot perhaps? Thanks

 

  • Below rule will work. Assign default pool to Virtual server. F5 will take care to route it to pool. For other than the HEAD method below is the iRule.

     

    when HTTP_REQUEST { if { [HTTP::method] ne "HEAD" } {

     

    HTTP::redirect "; } }

     

    Please note: ";; is enclosed in double quotes.

     

  • What exactly are you trying to do with this iRule? Seems like an unusual use of the forward command.

     

  • No destination address or port translation is performed during forward method. Have to set the routes in the LTM routing table? link

     

  • If you provide the error message, it can be useful!!!

     

    Error message may contain the line with error!

     

  • When http req comes in with method HEAD, I need to forward that on to the pool members. If the connection comes in as any other http req, it should redirect to the https link. Pretty simple I think... Thanks,

     

  • Below rule will work. Assign default pool to Virtual server. F5 will take care to route it to pool. For other than the HEAD method below is the iRule.

     

    when HTTP_REQUEST { if { [HTTP::method] ne "HEAD" } {

     

    HTTP::redirect "; } }

     

    Please note: ";; is enclosed in double quotes.

     

  • uzair's avatar
    uzair
    Icon for Nimbostratus rankNimbostratus

    Below rule will work. Assign default pool to Virtual server. F5 will take care to route it to pool. For other than the HEAD method below is the iRule.

     

    when HTTP_REQUEST { if { [HTTP::method] ne "HEAD" } {

     

    HTTP::redirect "; } }

     

    Please note: ";; is enclosed in double quotes.