Nilendu_Haldar_
Sep 10, 2018Nimbostratus
iRule - Need to skip anything after a specific string in the URI
I already have below iRule, which works good.
when HTTP_REQUEST { if { ![class match [string tolower [HTTP::uri]] contains exception_abc1_to_abc] } { if {([HTTP::uri] starts_with "/wps/portal/home/mycompany/login/!ut") or ([HTTP::uri] starts_with "/wps/portal/home/!ut/") } { HTTP::redirect "; } elseif {([scan [HTTP::uri] {/wps/portal/home/%s} new_uri] == 1) or ([scan [HTTP::uri] {/wps/myportal/home/%s} new_uri] == 1)} { HTTP::redirect http://wwwabc.mydomain.com/${new_uri} } } }
Now I need to add more scenarios as below to the above iRule. Can you please help ?
- If newURI contains “/!ut” , we need to skip everything after “/!ut”