Forum Discussion

Rick_Haughton_3's avatar
Rick_Haughton_3
Historic F5 Account
Jun 12, 2006

using iRule to replace uri not working as hoped

I am submitting this on behalf of customer. He wrote this irule, it seems to be changing the uri as needed, however the client browser is sending rst and killing session. Are we doing anything wrong here?

When customer points browser at http://x.domain.com/URI1 without this iRule in place, his page loads just fine. When we goto http://x.domain.com/URI2, the uri gets changed to URI1, however the page does not load.

There is only one member in the pool. Is there anything you can think of that would be wrong? Thank you.


rule uriMod {
  when HTTP_REQUEST {
    if {[HTTP::uri] eq "/URI2"} {
      HTTP::uri "/URI1" 
      pool httpPool
    }
    if {[HTTP::uri] eq "/otheruri"} {
      HTTP::uri "/" 
      use pool http2pool
    }
    if {[HTTP::uri] eq "/thirduri"} {
      HTTP::uri "/xyz" 
      pool xyzpool
    }
  }
}
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    That rule looks fine, as far as I can tell. It's just doing a simple URI replace, then forwarding the request along to the appropriate pool. Nothing about this change should cause a reset, from the information given here.

     

     

    Colin