Forum Discussion

rameshkarthik_1's avatar
rameshkarthik_1
Icon for Nimbostratus rankNimbostratus
Feb 28, 2015

Need to apply iRule for a VIP whose type is "Performance Layer 4" profile

Hi

I am a newbie to F5 and iRule.

One of our requirement is the url re-direction as below

www.ramkar.com/startup ==> www.ramkar.com/login

I did researched this forum and framed the following 2 iRules:

iRule-1
when HTTP_REQUEST 
{ 

    if { [string tolower [HTTP::path]] equals "/login" || [string tolower [HTTP::path]] equals "/startup" } 
    { 
        HTTP::uri "/login" 
    } 
} 
iRule-2
when HTTP_REQUEST 
{
    if { ([HTTP::host] equals "www.ramkar.com") and ([HTTP::uri] ends_with "/startup") } 
    {
        HTTP::redirect https://www.ramkar.com/login
    }
}

The type of our VIP( was "Performance Layer 4". When checked with our IT and Network Team, they suggested to change the type to "Performance HTTP" as iRules will not work with "Performance Layer 4" type. We did this change in F5 for the VIP: www.ramkar.com. But when we tried to apply the irule-1, we are getting the error:

"01070394:3:HTTP_REQUEST event in rule (ramkar) requires an associated HTTP or ICAP profile on the virtual server (/blah/blah/"

Can any one please help me apply any one of these iRules in F5.

Please note that our Network Team advised that we should not apply Standard or HTTP profile to this F5 as it will slowdown the PROD environment.

Any help is greatly appreciated

-- K.Ramesh Karthik.

2 Replies

  • Colin_Rogers_17's avatar
    Colin_Rogers_17
    Historic F5 Account
    Hello. You should just need to apply and actual http profile to the virtual server as well. The triggers you are using (HTTP_REQUEST), require an http profile in order for this to function correctly. Hope that helps
  • Hi Colin, Thanks for the comment. Can you please be a bit more specific? Under the "General Properties" of this VIP, there are 2 settings of concern. Please let me know the values that I should set for the below 2 configurations 1. Type 2. Protocol Profile (Client) Please I want to know the exact value that I should set as I am completely new to the F5 world.