Forum Discussion
apache2020_5685
Aug 04, 2011Nimbostratus
Redirect to different pools depending on requested URI
Hi
I am looking for an irule to forward traffic to different pools dependant on the DNS name requested by the client, so effectively the client requests any of the below which all map to the same vips:
- cat1.com/test.asp
- cat2.com/test.asp
- cat3.com/test.asp
depending on which URI is called it should forward to:
- pool1
- pool2
- pool3
Thanks for your help
David
- boomchke_11156NimbostratusAre you looking to redirect based on the /test.asp or on the actual DNS name catx.com?
- boomchke_11156NimbostratusSee this thread, there are a couple examples of what you are lookig for.
- apache2020_5685NimbostratusHi
- apache2020_5685NimbostratusHi
- hooleylistCirrostratusI'd try this to explicitly define which pool to use in all cases:
when CLIENT_ACCEPTED { Save the name of the VS default pool before it can be modified in HTTP_REQUEST set default_pool [LB::server pool] } when HTTP_REQUEST { switch [string tolower [HTTP::host]] { cat1.com { pool pool1 } cat2.com { pool pool2 } default { pool $default_pool } } }
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