Forum Discussion
Redirect for multiple URL
Hi,
This might be a very simple question, I'm not really a good programmer :(... How can we redirect the traffic to one URL(F5 link) with two 'if' urls:
Example: If User types any of the below two URLs, traffic should be routed to (F5 link) www.test.company.com using an irule: www.test.company.com/user www.test.company.com/irj/portal
Thanks, Bob
2 Replies
- Kevin_Stewart
Employee
So for example, if the user types "www.test.company.com/irj/portal", you want them to be redirected to "www.test.company.com/"? Here's one way to do that:
when HTTP_REQUEST { switch [string tolower [HTTP::uri]] { "/user" - "/irj/portal" { HTTP::redirect "http://www.test.company.com/" } } } - Kevin_Stewart
Employee
Try this:
when HTTP_REQUEST { switch [string tolower [HTTP::uri]] { "/" - "/irj/portal" { HTTP::redirect "http://www.test.company.com/user" } } }
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