For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Parveez_70209's avatar
Parveez_70209
Icon for Nimbostratus rankNimbostratus
Mar 08, 2014

HTTP::uri "/default.html" Irule parameter not coming correct in Irule : Kindly Guide

Hi,

Kindly assist in reformatting the Irule, seems like in F5 Editor,HTTP::uri "/default.html" is not coming correct

when CLIENT_ACCEPTED { if { [active_members [LB::server pool]] == 0 } {

    HTTP::uri "/default.html"
    pool maintenance_page

}

}

6 Replies

  • You just can't use HTTP commands (layer 7) in the CLIENT_ACCEPTED event (layer 4). Change the event to HTTP_REQUEST and you should be good to go.

     

  • Hi Kevin,

     

    Thank you.

     

    For now HTTP Profile is not attached into HTTP and HTTPS Virtual Profile neither in HTTPS Virtual-Server SSL Is attached, but while I try to attach the HTTP Profile, the contents don’t come up, so that’s the reason failing to attach a new proposed Irule mentioned below( as HTTP_REQUEST event Irule requires a HTTP Profile attached): Need your earnest assistance into this.

     

    So, how can we modify or edit the Irule with CLIENT_ACCEPTED, because currently we have the below Irule:

     

    when CLIENT_ACCEPTED { if { [active_members [LB::server pool]] == 0 } {

     

    pool maintenance_page

     

    } }

     

    But the problem is that, it works good with the parent URL, but not with Sublinks, for eg:

     

    Issue is when attaching the Maintainence page into the Profile, it works good with: https://www.test.com/ - Maintenance page is shown

     

    But getting the 404 Error while accessing : https://www.test.com/portal/welcome.htm

     

    Thanks and Regards

     

  • The problem I assume is that when you are accessing "pool maintenance_page" without altering the URI, the pool doesn't know the requested path and gives you a 404.

     

    So you need to attach the http profile to the virtual - what is stopping you?

     

  • Issue was when we apply HTTP Profile, the page seems to be broken:

    So, we rectified the same using the below steps:

    1. HTTP Profile added into both HTTP and HTTPS Profile. 2.Added SSL Client as well as Server default SSL.( Tried keeping only Client SSL in test setup, but page seems to be broken, so attached the default Server SSL Profile). 3.Into the existing pool member-servers, they are doing redirect to https,so in HTTP Virtual-server there was no HTTPtoHTTPS redirection attached. But so we tried attaching a Irule which will basically redirect the same to HTTPS Profile) 4.Created a new Irule named : Maintenance_Test-Irule ,which will call the Maintenance call alongwith disabling the sessions against SSL server-side.( Disabling the SSL server-side sessions going to Maintenance page was required because jpg images were not loading).

    when HTTP_REQUEST { if { [active_members [LB::server pool]] <= 0 } {

        SSL::disable serverside
        pool maintenance_page
    }
    

    }

    Thanks and Regards