Forum Discussion
iRule redirect URI to another pool
In general, as the following recipe explains, HTTP::path is the right choice for this type of selection and case normalization is typically not desirable:
However, that doesn't answer your question. I recommend implementing this rule:
when HTTP_REQUEST {
log local0. "PATH = (HTTP::path)"
if { [HTTP::path] starts_with "/video" } {
log local0. " .. starts_with /video"
pool Video_pool
}
}
Assuming the rule is executed at all, the first message should be logged on each request. It will also tell you what the extracted HTTP::path is. The second message should be logged only if there is a match. From here, you may be able to see what's occurring. If not, can you share which of these is ending up in the log?
- Richard_77286Oct 31, 2016
Nimbostratus
Hi Vernon, Thanks for the reply. Here's the log output after implementing the rule. I'm still getting a 404.
Oct 31 14:07:32 CDIF5LTM01 info tmm[18119]: Rule /Common/RedirectTest-iRule : PATH = (HTTP::path) Oct 31 14:07:32 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH = (HTTP::path) Oct 31 14:07:32 CDIF5LTM01 info tmm1[18119]: Rule /Common/RedirectTest-iRule : PATH = (HTTP::path) Oct 31 14:07:32 CDIF5LTM01 info tmm1[18119]: Rule /Common/RedirectTest-iRule : .. starts_with /video Oct 31 14:07:32 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH = (HTTP::path) Oct 31 14:07:32 CDIF5LTM01 info tmm2[18119]: Rule /Common/RedirectTest-iRule : PATH =
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
