Forum Discussion
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 ?
2 Replies
- nitass
Employee
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?
- jaked_150553
Nimbostratus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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