Forum Discussion

daveclark_20228's avatar
daveclark_20228
Icon for Nimbostratus rankNimbostratus
Jun 12, 2009

Test VIPs with URI and Host redirection

Hello

 

 

I would like to merge 24 Test VIPs (as i see a waste of VIPS and Ip addresses)

 

 

So therefore i would like to combine them in to a single VS

 

 

The requirement is as follows

 

 

https://172.18.140.33/nexustest/test1.html to redirect to

 

node 172.18.141.10:81/nexusclient/login.aspx

 

 

Both services terminate SSL on the F5 LTM

 

 

I tried this script with not much luck

 

 

 

 

when HTTP_REQUEST {

 

 

log local0. "Priority 500: [IP::client_addr]:[TCP::client_port]: Original request to [HTTP::host][HTTP::uri]"

 

 

switch [string tolower [HTTP::host]] {

 

"host.domain.com" {

 

HTTP::uri [string map {"/nexustest" "/nexusclient" "test1.html" "login.aspx"} [HTTP::uri]]

 

node 172.18.141.10 81

 

}

 

default {

 

reject

 

}

 

}

 

}

 

when HTTP_REQUEST priority 501 {

 

log local0. "Priority 501: [IP::client_addr]:[TCP::client_port]: Updated request to [HTTP::host][HTTP::uri]"

 

}

 

 

 

Could one of you helpful people advise me the best way of getting this work.

 

 

Many thanks
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi,

     

     

    Are the 24 test VIPs defined on the same IP, but different ports or different IP and port combinations? How do you want to map requests to the single VIP to different pool members (by requested port, host header, URI, etc)?

     

     

    Aaron
  • Same VIP address , with 12 hosts iP address on port 81 and 12 on port 90

     

     

    I think i have figured it out , i will use the snippet above and base my irule on it.

     

     

    Regards

     

     

    Dave Clark