Forum Discussion

Mohammed_Moin's avatar
Mohammed_Moin
Icon for Nimbostratus rankNimbostratus
Sep 14, 2019

Irule to redirect traffic to particular pool

Hi,

I configured a VIP with pool. which is working fine.

Now there is business requirement is that to same VIP with different url should be redirect to different pool.

Below is the example

URL: https://studentportal.test.com/

Pool name: <POOL_StudentPortal>

 

URL: https://studentsportal.test.com/enrollment

Pool Name: <POOL_StudentEnroll>

 

Below is the irule I configured:

 

------------------------------------------------------

when HTTP_REQUEST {

if { [string tolower [HTTP::uri]] starts_with "/enrollment" }

{ pool POOL_StudentEnroll }

else {

pool POOL_StudentPortal

}

}

 

-----------------------------

For some reason, the above irule is not working.

Any help is highly appreciated.

 

Thanks.

2 Replies