Forum Discussion

karan12_154818's avatar
karan12_154818
Icon for Nimbostratus rankNimbostratus
Jul 22, 2014

I rule for redirection

On one of the HTTPS virtual server,was already using i-rule as below:-

 

when HTTP_REQUEST { if { [HTTP::uri] contains "xxx" } { node 10.x.x.x%xxx:x } } Now client is asking for redirection of HTTPS url(https://170.x.x.x/analytics) to https://170.x.x.x/analytics/saw.dll?home&startPage=1 also so applied irule as below:-

 

when HTTP_REQUEST { if { [HTTP::uri] starts_with "/analytics" } { HTTP::redirect "/analytics/saw.dll?home&startPage=1" } }

 

But on applying this it is getting looped.Can you please suggest is there a way to club both the i-rule or what should be correct i-rule to achieve this.

 

2 Replies

  • It's because the starts_with operator will match both /analytics and /analytics/saw.dll?home&startPage=1

     

    You should change starts_with to be eq so it only matches the /analytics and not everything else.