Forum Discussion
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
3 Replies
- Arie
Altostratus
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)).
- Michael_-_Harr1
Nimbostratus
Thank you for your help. We are on version 11.3 The IRULE works as expected - Arie
Altostratus
Michael, if it worked can you vote up the answer?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com