iRule to redirect to new url, but retain path after first location
I have been tasked with creating an irule to redirect a url to a new server. However the existing server will still have other urls still working on it. We need to retain everything in the URL after the first path.
old url: https://www.abc.com/APP/ redirect: https://app.def.com/
and example would be OLD URL: https://www.abc.com/APP/DD_CalendarDetail.aspx?id=16888&dt=2015-09-25 REDIRECT URL: https://app.def.com/DD_CalendarDetail.aspx?id=16888&dt=2015-09-25
Would the following both redirect, and maintain the path after the /APP/ ?
when HTTP_REQUEST { if { [HTTP::host] equals "www.abc.com" and [HTTP::uri] starts_with "/APP/" } { HTTP::redirect "https://app.def.com/"
In addition, am I correct in the assumption that any urls not matching will just ignore the iRule and process normally?