cancel
Showing results for 
Search instead for 
Did you mean: 

Remove URI on Process

IainThomson85_1
Cumulonimbus
Cumulonimbus

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 2

tiziano_rosato
Altocumulus
Altocumulus

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

 

IainThomson85_1
Cumulonimbus
Cumulonimbus

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

 

Afraid my TCL knowledge at the moment is very limited.

 

Regards,