Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

http redirect iRule not working

I have a rather simple iRule which is not working as intended. Maybe someone with a programming background could tell me what I am doing wrong?

The rule needs to perform a redirect, except if the client IP is member of a specific group (data group list). Here is what I got so far

when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "something.mydomain.com" and not ([class match [IP::client_addr] equals EXCEPTION-LIST]) } { HTTP::redirect "https://somethingelse.domain.com/[HTTP::uri]" } }

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi Manuel, With a log.local0 statement check [IP::client_addr] like this:

log local0. "--> [IP::client_addr]"

may be there is a "%" statement (indicating the partition) that make unsuccesfull macth with data group.

regards

1
Comments on this Answer
Comment made 16-Nov-2016 by Manuel 210

Thanks Leonardo, the issue is solved now!

0