Irule to exempt redirection for connections from specific IP/range and redirect all other traffic to https
I am using below irule, my requirement is when request comes from specific set of IP or range of IP redirection should not happen and all other connections/requests should get https redirection. Kindly assist as below used irule statistics shows hits but all are failing.
when HTTP_REQUEST {log local0. "Client: [IP::client_addr]" if { [class match [IP::client_addr] contains cdm_test_range] } {HTTP::redirect http://[HTTP::host][HTTP::uri] pool cdms-stg-pool-tcp80 } else {HTTP::redirect https://[HTTP::host][HTTP::uri] } }