Forum Discussion

Kapil_Sharma_61's avatar
Kapil_Sharma_61
Icon for Nimbostratus rankNimbostratus
Sep 14, 2005

issues with string trimleft

Hi,

 

I am trying the following irules and having some issues with it:

 

 

when HTTP_REQUEST {

 

set uri [HTTP::uri]

 

if { $uri matches_regex "^/axess2" } {

 

set new_uri [string trimleft $uri ?/axess2?]

 

HTTP::uri "/$new_uri"

 

pool pool1

 

}

 

}

 

 

 

Using the above irule, if i try the URL

 

"https://www.foo.com/axess2/sysicons/image1.gif"

 

 

the result is:

 

"ysicons/image1.gif"

 

 

 

Can you please let me know what is wrong with my irule?

 

 

Thanks,

 

Kapil
No RepliesBe the first to reply