Forum Discussion

_33_113201's avatar
_33_113201
Icon for Nimbostratus rankNimbostratus
Apr 16, 2013

BigIP Http: forward

Hello all,

 

 

I am trying to use an Irule on the bigIP to forward traffic to a set URL.

 

 

I tested the below rule out.

 

 

when HTTP_REQUEST{

 

if {([matchclass [IP::client_addr] equals $::partner_proxy])} {

 

HTTP::redirect "http://www.example.com/newlocation.html"

 

}

 

}

 

else HTTP::redirect ""

 

}

 

 

But what I am getting is a HTTP redirect (the client gets the new URL sent back and the client calls the new URL) with this and not a http forward.

 

 

Any ideas where I can get a http forward where the bigIP maintains the state forwards the request to the new URL and then handles return traffic too.

 

 

Thanks, Vijay

 

5 Replies

  • Hi Vijay,

    Can you try this?

    
    when HTTP_REQUEST {
    
     Check if client is in the partner_proxy IP datagroup
    if {([class match [IP::client_addr] equals partner_proxy])} {
    
     Rewrite URI to hardcoded value
    HTTP::uri "/newlocation.html"
    
    } else {
    
     Redirect client to blocking URL
    HTTP::redirect "http://www.accessdenied.com/newlocation.html"
    }
    }
    

    Aaron
  • Hello Aaron thanks for the reply, but I do not want the URI part to change I want the whole domain to change.

     

     

    i.e.

     

    1. I make a connection to domain.com/newlocation.html

     

    2. 1st case is met request gets forwarded to "http://www.example.com/newlocation.html"

     

    3. 2nd case is met request gets forwarded to "http://www.accessdenied.com/newlocation.html"

     

    4. client still sees domain.com in the browser and is connecting to the same virtual.

     

  • forward proxy.

     

     

    I also want the return traffic to pass thru the F5 back to the client.