Forum Discussion
iRule for URL filtering not working as intended
I have configured the following iRule in the aim of only allowing clients to access version3 on server helilocal
when HTTP_REQUEST {
if { !([HTTP::host] equals "helilocal") and !([HTTP::uri] starts_with "/version3") } {
reject
}
log local0. "Request from [IP::client_addr] for [HTTP::uri] has been rejected."
}
I have applied the iRule to an HTTP VS but when I test it, I can browse to anything on the server. All the links below are working
Can someone tell what I am doing wrong?
4 Replies
- Fabou_139732
Nimbostratus
Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.
I will remove the "" and test again tonight.
- Fabou_139732
Nimbostratus
Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.
I will remove the "" and test again tonight.
- Fabou_139732
Nimbostratus
Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.
I will remove the "" and test again tonight.
- Fabou_139732
Nimbostratus
Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.
I will remove the "" and test again tonight.
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