Forum Discussion

ngaze_66812's avatar
ngaze_66812
Icon for Nimbostratus rankNimbostratus
Sep 05, 2012

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?

 

  • It 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.