Forum Discussion
Neil_66348
Nimbostratus
Jan 24, 2010HTTP URI to multiple pools
Hi guys ,
Fairly new to iRules and TCL , would like to have the ability to have different uri's for the same site directed to different pools.
Essentially :
www.co...
hoolio
Cirrostratus
Jan 25, 2010Hi Neil,
There are a few issues. You're using switch to check the host header value, but then using switch cases which include the URI. This will never match as the host header doesn't contain the URI. You could fix this by either changing the switch to check "[string tolower [HTTP::host]][HTTP::uri]" or removing the /account and /service from the switch cases. The latter option would mean you could remove the second www.company.com entry. Also, you're checking for a path of / in each switch case. If the switch case is matching on a specific URI, the path will never be just /.
If you clarify what logic you want to implement, we can help you write the iRule to fit it.
Aaron
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