How would I create I rule for HTTPS client redirect

URL client does get request https://branches.test.org/webapp/rest/public/redirect/android

redirect to https://play.google.com/store/apps/details?id=org.penfed.mobile.banking

What version are you on? Before 11.4 you could use an HTTP Class (Local Traffic ›› Profiles : Protocol : HTTP Class). If you’re on 11.4 you can use a Local Traffic Policy.

You could also use an iRule:

when HTTP_REQUEST {

    if { [string tolower [HTTP::path]] starts_with "/webapp/rest/public/redirect/android" } {

        HTTP::respond 302 Location "https://play.google.com/store/apps/details?id=org.penfed.mobile.banking"

    }

}

Note that I used “starts_with”. This may or may not work in your case (depending an whether any other paths start with “/webapp/rest/public/redirect/android”). However, “starts_with” does get around other issues that often plague redirects (e.g. trailing slashes, inclusion of default file names (like index.html)).

Thank you for your help. We are on version 11.3 The IRULE works as expected

Michael, if it worked can you vote up the answer?