Forum Discussion
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
- MiLK_MaN
Nimbostratus
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.
- karan12_154818
Nimbostratus
Changed starts_with to be eq now its not looping.
Thanks a lot!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com