Forum Discussion
Gustavo_Lazarte
Nimbostratus
Sep 06, 2006iRule Not working SIMPLE AND URGENT
The following iRules should send the .jpg traffic to 10.1.0.50
when HTTP_REQUEST {
if {[HTTP::uri] contains "206.112.74.148"}{
if {[HTTP::uri] ends_with ".jpg"}{
node 10.1.0.50 80
} else {
pool iwrewards
}
}
}
when I check the log on the cache server I am getting .CFM .ASP .PHP pages requests.
the default pool is edge (10.1.0.50). I wanted to make the default pool iwrewards so I do not have the cache server as the bottleneck of traffic and let the iRule send the jpg traffic to the cache server. But when I do that the iRule does not send any traffic to the cache server.
Thanks for all your help
- JRahm
Admin
Can you provide a few more details? Are you sure 206.112.74.148 is in the URI? Consider this: - Gustavo_Lazarte
Nimbostratus
sorry for the iRule - Gil_Yoder_43271
Nimbostratus
Basically your rule says if the requested host does not contain "206.112.74.148", use the default pool, which you say is 10.1.0.50. If someone makes a request with a DNS name rather than the IP address, the host name will not contain "206.112.74.148". For example if the name was www.mysite.com, and this name resolved to "206.112.74.148" a request to www.mysite.com would bypass your rule and the default pool would be used. - As I always recommend, add some log statements to find out where your logic is going bad.
when HTTP_REQUEST { log local0. "Host: [HTTP::host] log local0. "Uri: [HTTP::uri]" if {[HTTP::host] contains "206.112.74.148"}{ log local0. "Host contains 206.112.74.148" if {[HTTP::uri] ends_with ".jpg"}{ log local0. "uri ends with .jpg" node 10.1.0.50 80 } else { log local0. "uri doesn't end with .jpg" pool iwrewards } } }
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