Forum Discussion
Brand new to iRules and need help (redirect)
I have a request from the business to find a work around to an error they have. They printed and published on the web an incorrect URL. So instead of correct the publication they would like me to correct it by redirecting them to another URL. But I have tried other redirects but not able to get it to work.
I have two requests
1. redirect from my.example.org to my.example.org/srp/app/home (this I am able to get to work just as it should.
2. redirect from my.example.org/srp/aap/home to my.example.org/srp/app/home (this one I am not able to get to work, so this is the one I need some help with)
again I am brand new to this and any help would be great.
Travis
4 Replies
- What_Lies_Bene1
Cirrostratus
This one from user nitass should do the trick;when HTTP_REQUEST { switch [string tolower [HTTP::path]] { "/" - "/srp/aap/home" { HTTP::redirect "https://[HTTP::host]/srp/app/home" } } } }
- hoolio
Cirrostratus
Hi WLB, - Travis_47832
Nimbostratus
worked as needed thank you very much for the help - What_Lies_Bene1
Cirrostratus
You're welcome Aaron, my pleasure, I'm learning quite a bit myself. Cheers
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