Forum Discussion
iRule switch pool based on URI
Hello,
It sounds like you are trying to redirect traffic to a different pool based on URI while also maintaining SSO authentication. However, you are encountering issues with the SSO process when attempting to redirect the traffic.
One approach you could consider is using an iRule to achieve this. With an iRule, you can inspect and manipulate traffic at a more granular level than with a local traffic policy. Here is an example iRule that may help you achieve your goal:
This iRule checks if the incoming request's host matches "sample-site.com". If it does, it checks if the URI starts with "/non-default-page". If it does, it redirects the request to the non-default pool. If it doesn't, it redirects the request to the default pool. Note that this iRule assumes that the SSO authentication is already complete, and does not interfere with that process.
It's also worth noting that if you want to keep the left side of the URL the same, you can modify the "pool" command to include the path portion of the URL, like this:
This will redirect the request to the default pool while preserving the left side of the URL. hope so it will help you
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