irule to reject requests based in uri

I am using the following irule to reject http::requests is the http::uri starts with “/source”

when HTTP_REQUEST {

if{[HTTP::uri] starts_with “/source” } { reject } }

Appending this to the virtual is rejecting all requests, remove this and the the virtual is working again. Any ideas anyone ?

Appending this to the virtual is rejecting all requests, remove this and the the virtual is working again. Any ideas anyone ?

is there any error in /var/log/ltm?

Oh yes… “b verify load” didn’t show any errors but tailing /var/log/ltm showed the error

local/tmm err tmm[4938]: 01220001:3: TCL error: test-exchange-rule - invalid command name “if{/” while executing “if{[HTTP::uri] starts_with “/source” } { reject }”

changed the rule like this :

when HTTP_REQUEST {

if { [HTTP::uri] starts_with “/source” } { reject } }

there should be space between if and the following { … now it works !! thanks for your help