Forum Discussion
Samir_Jha_52506
Aug 08, 2018Noctilucent
Hope its URL. Check it out
when HTTP_REQUEST {
if { (string tolower [HTTP::host] equals "www.xyz.com") or (string tolower [HTTP::host] equals "www.pqr.com") } {
pool pool_common_ABC
}
}
- mike03_367540Aug 08, 2018Nimbostratus
Thanks for quick response can we add else command and rest of traffic should be
- Samir_Jha_52506Aug 08, 2018Noctilucent
Yes. we can use.
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "www.xyz.com") or ([string tolower [HTTP::host]] equals "www.pqr.com") } { pool pool_common_ABC } else { reject } }
- mike03_367540Aug 10, 2018Nimbostratuserror: [invalid index: should be integer or "end"][equals]
- mike03_367540Aug 10, 2018Nimbostratus
giving an error
- mike03_367540Aug 10, 2018Nimbostratus
works like that
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "abc.com" or [string tolower [HTTP::host]] equals "xyz.com"} { pool pool_abc } else {
- Samir_Jha_52506Aug 10, 2018Noctilucent
I don't see issue in previous, it seems
missed. Correct it.... Check now]
- mike03_367540Aug 10, 2018Nimbostratus
Thanks Samir How can we use HTTP request for Data Group ..instead of url ..if I can make data group with all the url so how can i write the irule
- Samir_Jha_52506Aug 10, 2018Noctilucent
something like this, you can use.
class redirecthost { www.abc.com www.pqr.com www.xyz.com } when HTTP_REQUEST { if { [matchclass [string tolower [HTTP::host]] equals redirecthost] } { pool pool_A } else { reject } }
- mike03_367540Aug 10, 2018Nimbostratus
working great Thanks,