Forum Discussion
irule uri traffic redirection failing
- Nov 02, 2022
mplaksin0First I would create a /32 netmask OneConnect profile and associate it with the virtual server in question. After you have done that use the following iRule configuration replacing whatever you might want to match in the if statement but leave everything else and that should solve your issue.
when CLIENT_ACCEPTED { set DEFAULT_POOL [LB::server pool] } when HTTP_REQUEST { if { [HTTP::uri] starts_with "/specialurl" } { snatpool NAT_Outside pool Apps_pool log local0. "[IP::client_addr] Ingreso a [HTTP::uri]" } else { pool $DEFAULT_POOL } }
mplaksin0First I would create a /32 netmask OneConnect profile and associate it with the virtual server in question. After you have done that use the following iRule configuration replacing whatever you might want to match in the if statement but leave everything else and that should solve your issue.
when CLIENT_ACCEPTED {
set DEFAULT_POOL [LB::server pool]
}
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/specialurl" } {
snatpool NAT_Outside
pool Apps_pool
log local0. "[IP::client_addr] Ingreso a [HTTP::uri]"
} else {
pool $DEFAULT_POOL
}
}
I did a similar configuration, and it is true it works correctly. In the VS use as default pool App_Pool. In the Irule, indicate that if it "does not contain" /app_pool, redirect to the default pool and it started to work.
Recent Discussions
Related Content
* 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