Forum Discussion
szia_80879
Nimbostratus
Sep 23, 2008Redirect request using multiple conditions
Hello everyone,
I am having trouble making an iRule works. I could not figure out what is causing this issue. Let me explain what I want to accomplish with the iRule.
I have two URIs: “...
The_Bhattman
Nimbostratus
Sep 23, 2008I think I see what's happening in your code.
Try the following:
when HTTP_REQUEST {
if { ([HTTP::uri ends_with "/") or ([HTTP::uri] ends_with "/xyx")} {
if {[matchclass [IP::client_addr] == $::restricted_cleint_datagroup]} {
HTTP::redirect http://[HTTP::host]/xyz
pool Corporate_8080_Pool
} else {
HTTP::redirect http://[HTTP::host]/
pool Corporate_8080_Pool
}
}
log local0. "request accepted from client: [IP::client_addr] -> [IP::local_addr] -> [HTTP::uri]"
}
Hope this helps
CB
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