Forum Discussion
Murali_Thutera_
Nimbostratus
Jan 21, 2011iRule for conditional page redirection
Hi Guys,
I am new to iRule and i need help in writing the iRule for pagre redirection with condition.
Scenario
1.When user hits the big-ip first it should check the source IP...
Colin_Walker_12
Jan 25, 2011Historic F5 Account
This is definitely doable, assuming the username you're talking about using to base your redirects on is readable in the request. All you'd need to do, as Chris alluded to, would be to create a data group for the IPs that you want to redirect. The key would be the IP you want to redirect, the value of each entry would be what host/IP you want them redirected to. You'd then need to create another data group with user names in it. All you'd need then is to create an iRule that does a findclass on the first datagroup to see if the IP is matched and grab the associated value (the new IP/host to redirect the user to), then perform a matchclass on the data group containing usernames. If the user isn't present, redirect to the newly queried host/IP and you should be set.
Let us know if you need help with any of the specific steps in the code.
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
