Forum Discussion
fcocquyt_104704
Nimbostratus
May 29, 2013redirect to different pools
Hi,
It is probably a simple question however I'm not that familiar with irules.. I would need to have an iRule which checks if a url has a certain suffix.
For example if the url is www.example.com is should be directed to pool1
If the url is www.example.com/extrastuff it should be directed to pool2.
Is there a standard iRule for this ?
Thanks for all your help,
Frederik
2 Replies
- Kevin_Stewart
Employee
In its simplest form:when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/extrastuff" } { pool pool2 } else { pool pool1 } }
This will also send any URI that doesn't start with "/extrastuff" to pool1. You'll probably have to tweak the rule as you discover other URI paths. - fcocquyt_104704
Nimbostratus
Thank you so much Kevin !
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