Forum Discussion
Rob_Eberhardt_1
Sep 22, 2006Historic F5 Account
strange 302 error on URI inspect and Load Balance
I have a situation where I would like to take the following URL:
http://f5.site.com/lbtst2
and rewrite the back end url to be "/lbtest" but use the pool "lbtest2".
Simple right? Should be something along the lines of:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/lbtst2"}{
HTTP::uri "/lbtest";
log local0. "hit /lbtst2";
pool lbtest2;
}
}
However, when sniffing the traffic the load balancer is sending the
following:
HTTP Status: 302
HTTP Reason: Moved Temporarily ..
Location: http://f5.site.com/lbtest/ ..
This isn't what I want to do at all. I would like just he back-end service to be changed and the client to NEVER see the request change.
As you might have guessed the client gets the new location http://f5.site.com/lbtest/ and hits the LTM using the new rule set for "/lbtest".
Any ideas?
2 Replies
- Deb_Allen_18Historic F5 AccountHi Rob -
I would say you might not want to be so quick to attribute the redirect to the iRule, as your iRule doesn't contain any code which would send a redirect, and it should accomplish what you describe.
I would first suspect that there is a redirect still in place on the real server.
If that's not it, the only other thing I can think of is that you might have a fallback host specified on your virtual server, and all the default pool members are DOWN.
You might be able to verify by browsing directly to the real server & see if you get the same redirect. Otherwise, a simultaneous packet trace on the serverside and clientside vlans of LTM will reveal whether the redirect is generated by or simply propagated by LTM.
HTH
/deb - Rob_Eberhardt_1Historic F5 AccountTurned out the web server was issuing the redirect since it wasn't happy that the iRule didn't attach a trailing slash on the URI. Just had to change the iRule from "HTTP::uri "/lbtest" to "HTTP::uri "/lbtest/". Darn picky web servers...
Thanks!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
