Forum Discussion
RobS
Altostratus
Nov 05, 2019iRule help for two redirects based off uri with variable
Hi, I'm trying to create an iRule that does the following redirects: http://xxx.com/ -> https://yyy.com/find-a-provider/ http://xxx.com/Home/Physician?profileId=UserValue -> https://yyy....
- Nov 06, 2019
Hi RobS,
Can you try this iRule?
when HTTP_REQUEST { switch -glob [HTTP::uri] { "/" { HTTP::redirect "https://yyy.com/find-a-provider/" } "/Home/Physician?profileId*" { set UserValue [URI::query [HTTP::uri] profileId] # log local0. "profileId = $UserValue" HTTP::redirect "https://yyy.com/find-a-provider/physician/$UserValue" } } }
Samir
MVP
Nov 06, 2019Can be done but consider second redirection option then 1st. Let Devcentral team knows if any questions.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects