Forum Discussion

arthemis35_6341's avatar
arthemis35_6341
Icon for Nimbostratus rankNimbostratus
Oct 04, 2007

URI and port redirection

 

Hello guys,

 

 

my issue:

 

 

when a client request a certain URI ( e.g: F5.com ) on a Virtual Server on port 8080 , i want the F5 to send this request to a server on port 8080.

 

For all the other URI (*.*) i want the F5 to send this request on the same server

 

but on port 3128 ..

 

 

 

Could you help me please ?

 

 

Many thanks

 

David
  • Assuming you meant the Host instead of the URI and that your IP is 10.10.10.10, you could define two pools

    
    pool Apool {
      member 10.10.10.10:8080
    }
    pool Bpool{
      member 10.10.10.10:3128
    }

    and use the following rule.

    
    rule myRule {
      when HTTP_REQUEST {
        if { [string tolower [HTTP::host]] ends_with "F5.com" } {
          pool Apool
        } else { pool Bpool }
      }
    }

  • The use keyword was carried forward from 4.x, but it is unnecessary.