Forum Discussion
5 Replies
Sort By
Hi Ramesh,
Can you try this?
when HTTP_REQUEST { if { [HTTP::host] equals "i0.test.com" } { switch -glob [HTTP::uri] { "/" { HTTP::uri "/Base/Arx" node server01-ip 80 } "/Nas" { node server01-ip 8080 } } } }
-glob: allow string pattern matching. It will loop in condition-1, Without glob it will work well.
Try this irule.. Hope it will help.
when HTTP_REQUEST { if {[HTTP::uri] starts_with "/Nas" } { HTTP::uri "/Nas" node 172.x.x.x 8080 } elseif { HTTP::uri “/Base/Arx/" node 172.x.x.x 80 } }
- TimRikerCirrocumulus
Replace the “/Base with "/Base
ie: wrong quote.
I'd suggest adding a "default" case as well to avoid issues with existing connections
https://devcentral.f5.com/s/articles/oneconnect-for-my-irule
- Ramesh_BabuNimbostratus
Given script not working getting error.