Forum Discussion

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

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" & inte...
  • Enes_Afsin_Al's avatar
    Aug 10, 2022

    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
    	}
    }

    https://support.f5.com/csp/article/K19509439