Forum Discussion
Gustavo_Lazarte
Nimbostratus
Aug 22, 2006iRule Not working properly
I have the following iRule setup for my enviroment for reverse proxy
when HTTP_REQUEST {
if {[HTTP::uri] contains "***.***.***.148"}{
if {[HTTP::uri] ends_with ".jpg"}{
node 10.1.0.50 80
} else {
pool rewards
}
}
}
the Default pool is "cache" with the 10.1.0.50 cache server
the webserver pool is rewards.
it is caching correctly but I am also getting all type of other request on
my logs. This rule I should only allow .jpg requsts on my cache server.
Any ideas
Thanks
ps I am using BIG-IP 9.0.5 Build 59.7
- Colin_Walker_12Historic F5 AccountNote: Moved this over from the iRule Editor forums
- You are comparing the URI for containment of the string "***.***.***.148" Do your URI's really contain this string?
- Chad_Roberts_21
Nimbostratus
Is it possible that you mean for the IP address to be the server and not the uri? It sounds to me like you mean for that to be the host, and that the asterisks were put in to mask the true IP address of your environment for the sake of security. I may be wrong, but if that is the case, try changing the first if statement to {[HTTP::host] equals "***.***.***.148"}, where the address is the true IP.
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