Forum Discussion
Michael_Yates
Jul 22, 2013Nimbostratus
Hi Kenny,
You could save yourself a redirect by just modifying the incoming URI that is sent to the server instead of doing a full 302 Redirect.
Replace: HTTP::redirect "http://cassadmintest/cassadmin"
With: HTTP::uri "/cassadmin" and then send it to the pool. This will append the value to the end of the request and send it to the pool (that you have listed in the next line).
You can read up more on that here: HTTP::uri. Note: This is different from the normal [HTTP::uri] command.
Since you stated that this is just a portion of the iRule I don't know if you are doing it later down the line, but you should have a default action that handles the traffic if it is formatted properly.
Example:
- Request http://cassadmintest/ is directed to http://cassadmintest/cassadmin
- Now what happens when you are coming in to http://cassadmintest/cassadmin ???
Unless you have something that is a default of "send all traffic not handled by this iRule to the correct pool of servers...so that the server can sort out where it should go" then you will need to compensate by adding it.
Something like this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"cassadmintest*" {
if ([string tolower [HTTP::uri] equals "/") {
HTTP::uri "/cassadmin"
pool CassAdmin_test
return
}
else {
pool CassAdmin_test
}
Doing this should resolve your missing images problem.
Depending on how many of these you are doing I would suggest looking into a switch statement.
Regarding your statement:
no default pools selected -- no Persist (per our web dev team as they are handling it on the backend.)
We use the same term to describe different things. The F5's do not actually handle "Session Persistence" which is probably what your Developers are thinking. The F5 LTM handles "Server Affinity", meaning that we make sure that all of your client traffic goes to the same server. I'm sure that if you clarify that with your Developers they will want what we call Persistence added to the Virtual Server. (Cookie being the default, but that will only work properly with Web Browsers...if the Virtual Handles Application to Application Traffic....Cookie Persistence is not for you and I would suggest source_addr or something else).
Hope this helps. If any of this is confusion or unclear just let us know.