Forum Discussion
jholmes_39917
Jun 25, 2012Nimbostratus
URI client IP redirect
I am new to this group and irules so bare with me here. What I have is a site whos owners want a redirect to happen based on client ip range, and URI.
Example of what I have so far: ...
hooleylist
Jun 25, 2012Cirrostratus
I'd guess you have a space issue with the elseif clause. Can you try this?
when HTTP_REQUEST {
log local. "Client: [IP::client_addr]"
if { [HTTP::uri] starts_with "/some_uri" }{
if { [IP::addr [IP::client_addr] equals X.X.X.X/X] } {
pool blah
log local. "[IP::client_addr]: Matched first check"
} elseif { [IP::addr [IP::client_addr] equals X.X.X.X] } {
pool blah
log local. "[IP::client_addr]: Matched second check"
} else {
reject
}
}
}
Aaron
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