Forum Discussion
ngaze_66812
Sep 05, 2012Nimbostratus
URI rewrite to server pool failing
What I'm attempting to do here is change what is sent to the server from the Big-IP without changing the request that the user is sending. After changing the request, I would like to send that traffic to a load balanced pool.
Here's what I have so far:
when HTTP_REQUEST {
if {[HTTP::uri] contains "*/hotsauce*"}{
HTTP::uri "/ketchup"
pool ketchup-10804_pool
log local0. "[IP::client_addr]:[TCP::client_port]: Successfully accessed [HTTP::uri]"
}
else {
log local0. "[IP::client_addr]:[TCP::client_port]: Attempted to access [HTTP::uri]"
}
}
From /var/log/ltm:
Sep 5 13:00:13 local/tmm2 info tmm2[6717]: Rule ketchup_test_rule : x.x.x.x:3273: Attempted to access /hotsauce
What am I missing here?
- ngaze_66812NimbostratusIt looks like the asterisks were the problem here. I updated the rule to if {HTTP::uri] contains "/hotsauce"}{ and was able to get it to work. I've also since gone to a "starts_with" instead of "contains" just to keep it as secure as possible.
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