Forum Discussion
iRule redirect URI to another pool
My apologies. I forgot square braces around the logged HTTP::path. The code should be:
when HTTP_REQUEST {
log local0. "PATH = ([HTTP::path])"
if { [HTTP::path] starts_with "/video" } {
log local0. " .. starts_with /video"
pool Video_pool
}
}
In any case, it appears that you are occasionally matching, so at least in those cases, the rule is doing what you instruct. What suggests that it is failing? You mention a "404". I presume that the default pool members don't host anything at /video/*. Are you certain that Video_pool has at least one member that is up and that you are not using persistence on the flow?
You may try adding this:
when LB_FAILED {
log local0. "Trapped LB_FAILED from client [IP::client_addr]"
}
which will be raised if the pool call fails to select a pool member.
- Richard_77286Oct 31, 2016Nimbostratus
Vernon, The Video_pool is up and has 1 member server. The default pool members don't host anything at /video.
I will make the change on the rule and re-run and will provide the logs right away.
Thanks!
- Richard_77286Nov 01, 2016Nimbostratus
Hi Vernon, Below are the log output after making the change on the rule. I'm still getting error 404 "The requested URL /video/ was not found on this server."
Oct 31 21:37:08 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH = (/video/) Oct 31 21:37:08 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : .. starts_with /video Oct 31 21:37:30 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH = (/video/) Oct 31 21:37:30 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : .. starts_with /video Oct 31 21:37:44 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH = (/video/) Oct 31 21:37:44 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : .. starts_with /video Oct 31 21:38:08 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH = (/video/) Oct 31 21:38:08 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : .. starts_with /video Oct 31 21:38:12 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH = (/video/) Oct 31 21:38:12 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : .. starts_with /video
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