Forum Discussion
Manuel_60430
Nimbostratus
Nov 16, 2016http 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]"
}
}
1 Reply
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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects