cancel
Showing results for 
Search instead for 
Did you mean: 

iRule not working

Shavat_Zalpuri
Nimbostratus
Nimbostratus

Hi All,

 

I have a scenerio where i have a vip on which we have applied iRule stating that if url mention "abc-test" it should hit to different server and if url mentions "abc-dr" it should hit to different server.

 

Is there any issue with iRule ?

 

 

irule which we are using :

 

when HTTP_REQUEST {

switch -glob [string tolower [HTTP::uri]] {

"abc-test*" { pool abc-test }

"abc-dr*" { pool abc-dr }

}

}

2 REPLIES 2

Hi Shavat,

 

Uri starts with "/".

when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/abc-test*" { pool abc-test } "/abc-dr*" { pool abc-dr } } }

or

when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "*abc-test*" { pool abc-test } "*abc-dr*" { pool abc-dr } } }

 

 

Hi Enes,

 

Thank you for replying me.

 

So if i will apply ""/" or "*" , format of my iRule is correct and it should work .