For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

iRule's avatar
iRule
Icon for Cirrus rankCirrus
Aug 09, 2022
Solved

hostname redirect for public IPs only

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