URI Redirect using an iRule
Hi Guys,
We have a requirement for an application that we are migrating to F5 to have " /" added to end of particular URI.
eg: https://abc.com/itsm/console needs to be https://abc.com/itsm/console/
My VIP consist of an APM policy which uses F5 as SAML SP with external IDP to authenticate user session.
I used following irule to do the job, however it is not working as expected. Instead of adding the / to the URI I'm getting random URIs such as https://abc.com/itsm/console/login/logon.do
However if I manually enter https://abc.com/itsm/console/ I don't get such re directions and get to the expected webpage.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/itim/console" } {
HTTP::uri [string map {"/itim/console" "/itim/console/"} [HTTP::uri]]
}
}
Appreciate your help to correct my irule, also want your input on how to match multiple URIs and add / as there are 2 more URIs that I need to add / in the end