Forum Discussion

Lovleen_Arora's avatar
Lovleen_Arora
Icon for Nimbostratus rankNimbostratus
Jun 26, 2018

Select persistence based on URL path

Hi team, we have a requirement to publish exchange(about 8 backend servers) via F5, and do persistence base on the URL path typed in the browser by user. for example a attached image please. Is this possible on F5 at all? Any tips will be helpful please. many thanks.

 

1 Reply

  • Check sample iRule: https://devcentral.f5.com/Wiki/Default.aspx?Page=persist&NS=iRules

     

    Code
    Select different persistence methods by HTTP URI

    when HTTP_REQUEST {

     

    Check the requested URI switch -glob [HTTP::uri] { "/path1/* - "/path2/* { Request was for an IIS URI so select the pool and set a pool-specific cookie pool iis_pool persist cookie insert iis_persist 0 } default { Request was for an iPlanet URI so select the pool and source address persistence with a /24 source mask pool iplanet_pool persist source_addr 255.255.255.0 0 } } }