Forum Discussion
Block URIs and forward traffic 2 pools on same VIP
Hi Team,
We currently have a requirement for single VIP to service 2 URLs and also to check URI and only allow 4 specific URIs.
I currently have it as 2 different VIPs with 2 pool and have an irule attached to it block URIs as below which is working as expected to allow specific URIs
when HTTP_REQUEST {
switch -glob [HTTP::uri]]
"/abc*" -
"/bcd*" -
"/efg*" -
"/cvy" -
{
}
default
{
drop
}
}
}
I have prepared another irule which can be used to pass the traffic specific pool depending on the hostname.
when HTTP_REQUEST {
set hostname [string tolower [HTTP::host]]
switch $hostname {
"abc.com" {
pool abc_pool
}
default {
do nothing use the pool for VIP
}
}
}
Can I combine these irules to achieve which i wanted or would it be easier to use ltm policy?
1 Reply
You can combined two irule in Single iRule but above requirement is not clear.
Just put the dummy Application name and URL ==> Redirect Pool name
example :
URL ==>> www.abc.com and URI==> /pqr or /xyz ==> redirect pool ==> pool_A
URL ==> www.def.com and URI ==> /sat or /hij ==>> redirect pool ==> Pool_B
Hope you understand it.
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