ltm rule command whenΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



when
       Used to specify an event in an iRule.

SYNOPSIS
       when EVENT ((('priority' WHEN_PRIORITY) ('timing' WHEN_TIMING))#)?
       WHEN_SCRIPT

DESCRIPTION
       Used to specify an event in an iRule. All BIG-IP 9.X iRules begin with
       a when command. You can specify multiple when commands within a single
       iRule.

       timing and priority are optional parameters which can enable|disable
       timing and set the priority for the declared event.

RETURN VALUE
VALID DURING
       ANY_EVENT

EXAMPLES
	when CLIENT_ACCEPTED {
	    if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
		pool my_pool
	    }
	}

HINTS
SEE ALSO
       Block requests by reverse DNS record - Performs a reverse DNS lookup to
       validate client IP
       
       HTTP POST redirect preserving POST data - Use Javascript in an iRule to
       redirect HTTP POST requests to HTTPS
       
       Selective SNAT - iRule that SNATS based on host address and port while
       just forwarding everything else.
        VPN Sorter -
       An iRule that allows the sorting of VPN traffic to the various VPN
       servers 

CHANGE LOG
       @BIGIP-9.0.0 --First introduced the command.



BIG-IP				  2019-05-10			      iRule(1)