Forum Discussion

Dawn_Hughes_208's avatar
Icon for Nimbostratus rankNimbostratus
Mar 23, 2012

URI rewrite and pool with port redirection

I am really new to iRules and am hoping you experts can assist. We have a URL http://myurl that needs to go to two load-balanced packend URLs on different ports:








I first tried adding a pool with the two hosts and new ports, then tried writing a simple iRule with a uri rewrite to append the info on the end. When I check the local logs, I can see that it did the rewrite, but either it ignored the pool, or is not passing th euri to the pool members, because it is not working. I have tried removing the pool and trying to do both the uri rewrite and then select the pool on the iRule, but it does not like that either.



Does anyone have any suggestions on how I can accomplish this? Help would be most greatly appreciated

2 Replies

  • A number of questions....



    Do you mean you are going to https://myurl (not http://?)


    Are you then successfully doing ssl offload and then re-encrypting?


    Have you tried doing everything using clear-text http first?


    What uri would you expect to hit the servers if we were to go to http(s)://myurl/a/b/c ?


    Is there a reason why you may not want to do a redirect back to the client to have them craft the right url to hit myurl with? (For example, why not direct them to http(s)://myurl/path/newuri?NAME=Item ?
  • That would not work. It would need to be redirected to https://myurl:8443/a/b/c, but then that URL would need to be load-balanced between two backend servers. Those backend servers are expecting the exact URLs as listed. They will not listed on just port 443, and they will not respond unless the entire /a/b/c uri is passed.



    (Yes, I meant https - which makes it more difficult since I cannot see into any packet dumps!)