Forum Discussion

Shawn_Conway's avatar
Jan 07, 2020
Solved

Too many redirects - app code..

We have one application behind our F5 load balancer that is causing an error of "too many redirects". We are doing SSL off loading and have a redirect from http-https on virtual server, but i dont think that is the issue. It is only one server behind the VS. in their code they specify the complete URL with https://

Any thoughts?

 

We have no issues with any other apps on this server

 

  • before SSL offload, server redirect 80 -> 443.

    after SSL offload, F5 get 443 and send 80 to server.

    then server redirect to 443. and F5 get 443 and send 80 to server.

    For this reason, as guys mentioned work redirection one place is best.

    for example, server don`t do redirect. and F5 redirect 80 -> 443. F5 offload receive 443 to 80.

     

    this is easiest way.

     

    other way is redirect selectively but that cost many resource.

5 Replies

  • More likely another redirect is happening on the server.

    • Thanks yes they have it set somewhere in their code, but it works if the server is not going through F5.

  • SWJO's avatar
    SWJO
    Icon for Cirrostratus rankCirrostratus

    before SSL offload, server redirect 80 -> 443.

    after SSL offload, F5 get 443 and send 80 to server.

    then server redirect to 443. and F5 get 443 and send 80 to server.

    For this reason, as guys mentioned work redirection one place is best.

    for example, server don`t do redirect. and F5 redirect 80 -> 443. F5 offload receive 443 to 80.

     

    this is easiest way.

     

    other way is redirect selectively but that cost many resource.

  • "too many redirects" is usually an indication of a redirect loop. So having a redirect in more than one place is not a good idea.

    If you are able to share configs it might be helpful

     

  • Correct it was in their code on the app server. We updated the code to get out of the loop thanks for everyone responding