Forum Discussion
Wes_98712
Nimbostratus
Mar 17, 2006images irule
I have a strange problem, one that I can't seem to figure out, probably because I'm not thinking it through. I have the following rule:
else if (http_uri ends_with one of images) {
use pool p_cdimaging8001
}
That works great, but when I go to http:///branch.html the post function to search for a branch fails because the images end up getting cached in the cdimaging8001 pool (which is a netcache device), the post function essentially takes your source address (e.g. home or business) and prints out directions to a branch. If I add the following code the post function works:
else if (http_uri ends_with one of images and not http_uri starts_with "branch.html") {
use pool p_cdimaging8001
}
The post function works just fine now, and the driving directions come up great, but the problem now is no images are getting sent to the cdimaging8001 pool. What I want is something that says, if the uri contains branch.html go to the pool and do not cache, so for branch.html it should go directly to the servers, the following doesn't work.
else if (http_uri starts_with "/branch.html") {
use pool p_webpool
}
else if (http_uri ends_with one of images) {
use pool p_cdimaging8001
}
What is the correct syntax to use here? For every other page we should cache, for this particular page we shouldn't cache.
Thoughts?
-Wes
- Deb_Allen_18Historic F5 AccountHi Wes --
else if (http_uri ends_with one of images and not http_uri starts_with "branch.html") {
- Wes_98712
Nimbostratus
The class is the built in images class which contains .bmp .gif and .jpg among other things. - Deb_Allen_18Historic F5 AccountEach HTTP object, even images referenced within an HTML page, is a separate request, and each request can be sent to a different pool using logic similar to yours. It sounds like you need to be able to tell when an image is called by /branch.html. You can tell what page called the images by examining the "Referrer" header -- something to consider in building your conditions.
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