Forum Discussion
johnmervin_4578
Altostratus
May 31, 2017http redirect irule
I am working on a irule which basically strips "/abchef" on the URI before loadbalancing to a pool
here is my rule, the issue is if I remove "log local0" or "log" from this rule it did not work, is t...
cjunior
Nacreous
May 31, 2017Hi, I'm not sure what you need. You just need to log:
when HTTP_REQUEST {
if { [HTTP::host] contains "testlab.john.com" and [HTTP::uri] starts_with "/abcdef/api/" } {
log local0. "[substr [HTTP::uri] 7]"
pool testlab
}
}
or you need to strip and rewrite uri before send to a server:
when HTTP_REQUEST {
if { [HTTP::host] contains "testlab.john.com" and [HTTP::uri] starts_with "/abcdef/api/" } {
log local0. "[substr [HTTP::uri] 7]"
HTTP::uri [substr [HTTP::uri] 7]
pool testlab
}
}
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