Jaswinder
Nov 04, 2019Nimbostratus
irule for replacing URI
We have a url https://xyz.com/abc/default.aspx which is working fine at the moment. But when we put an irule to replace URI of any of the legacy URLs which doesn't start with "/abc" with "/abc/default.aspx" then https://xyz.com/abc/default.aspx stops working. Below is the irule that we have used. Also, we tried several variations of irule, even using redirect to https:// https://xyz.com/abc/default.aspx when URI doesn't start with "/abc" but it keeps breaking the original website.
when HTTP_REQUEST {
if { not ([HTTP::uri] starts_with "/abc") } {
HTTP::uri "/abc/default.asp"
}
}
Can someone please advice what changes should be made to the irule to get it working. Thank you.