Forum Discussion

IainThomson85_1's avatar
IainThomson85_1
Icon for Cumulonimbus rankCumulonimbus
Oct 08, 2014

Remove URI on Process

rule reports_https_rule { when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/gatehouse"} { pool reports_pool_gatehouse_https } else { pool reports_pool_https } } }

 

Hi Dev Central,

 

Have a rather strange requirement on this - On the basis of someone requesting www.foo.com/gatehouse it should be sent to one server, on the basis of www.foo.com it should be sent to another server.

 

However, here's the problem - gatehouse doesn't exist on the selected server, so returns a 404 error. So I would like to remove the URI after the pool selection has been evaluated.

 

Can anyone suggest the best way to go about this ?

 

2 Replies

  • Hi, you should intercept the LB_SELECTED event and then when the pool selected is gatehouse change the URI sent to the pool.

     

  • Tiziano - Any idea on the code that would need to be put it ?

     

    Afraid my TCL knowledge at the moment is very limited.

     

    Regards,