09-Aug-2022 08:29
Dear Community,
I am using following iRule to redirect traffic to another virtual IP during maintenance window but this iRule causes all traffic of external internet clinets with "public IPs" & internal clients inside our organization with "private IPs" as well to be redirected to maintenance page.
==========================
when HTTP_REQUEST {
if { [HTTP::host] contains "morning.abc.com" } {
HTTP::redirect "https://evening.xyz.com/en/contact-us/mobile/maintenance"
}
}
=====================
Kindly proivde an updated iRule which should redirect requests originating only from external internet clinets with "public IPs" to maintenance page & internal clients inside our organization with "private IPs" should not be redirected to https://evening.xyz.com/en/contact-us/mobile/maintenance
Best Regards
@LTM @iRule @ADC @Application Delivery
Solved! Go to Solution.
10-Aug-2022 03:02
Hi,
when HTTP_REQUEST {
if { [HTTP::host] eq "morning.abc.com" && not ([class match [IP::client_addr] equals /Common/private_net]) } {
HTTP::redirect "https://evening.xyz.com/en/contact-us/mobile/maintenance"
return
}
}
10-Aug-2022 03:02
Hi,
when HTTP_REQUEST {
if { [HTTP::host] eq "morning.abc.com" && not ([class match [IP::client_addr] equals /Common/private_net]) } {
HTTP::redirect "https://evening.xyz.com/en/contact-us/mobile/maintenance"
return
}
}
11-Aug-2022 05:17
Thank you Enes, it works fine.