Technical Forum
Ask questions. Discover Answers.
Showing results for 
Search instead for 
Did you mean: 

IIS Server redirects the f5 redirect and we are on a LOOP!


I can see that the backend IIS server redirects the URI again to /the-uri-needed. 


The correct redirect should have been from to, but that's not the case. 


Hence when the f5 redirects what we get is the following loop scenario. ---> IRULE ------> -----> IIS redirect -----> -----> IIS redirect again -----> -----> BREAKS THE SITE!


Chrome on its own handles this but with f5 this is not the case..


What can I do here?


UPDATE 11 DEC 2019:


I tried to simulate this on IIS but IIS doesn't support redirects from a /uri but only for the host, so I think there is also some problems with the application's own redirects here.



Hi David,


Can you share iRule?

I tried few things but it did not work is to replace the link from the response but still nothing . .

when HTTP_REQUEST {   HTTP::header remove Accept-Encoding STREAM::disable } when HTTP_RESPONSE {   if { [HTTP::header exists Location] } { HTTP::header replace Location [string map {"" ""} [HTTP::header Location]] }   if { [HTTP::header Content-Type] contains "text" } {   STREAM::expression {@}   } STREAM::enable }

This is one..


And another one to do the normal redirect from hostname to hostname/uri.




any ideas?

I think, this iRule looking clean.


Could each request match the redirect iRule?

Example loop:

when HTTP_REQUEST { if { [HTTP::uri] starts_with "/" } { HTTP::redirect "" } }