Forum Discussion
redirect rewirte option in http profile causing looping
I have enabled the redirect rewrite "ALL" in the http profile so it will redirect http:// to https:// server responses, this is working just fine however it causing the application to loop. Any thoughts? I have also tried to use iRules to accomplish the same thing, and the issue is the same the http gets redirected to https however it loops???
6 Replies
- Kevin_Stewart
Employee
I have to believe that what you're experiencing is an application specific behavior. The Redirect Rewrite option will catch a redirect from the server and rewrite http:// to https:// in the Location header. But if what you're sending back to the server from the redirect is still not what the application is requiring, then it may attempt to redirect you again, and again, and again... It's difficult to say what that may be though. I've seen applications like SharePoint that only care about the Host header, and apps like Webmin that apparently care about the Host and Referer headers. I would start by examining what the application does in the absence of the proxy layer, and then try to emulate that on the server side of the connection.
- Robin_Mordasie1Historic F5 AccountHi MIchael, is it possible that you are testing this feature with an SSL offload configuration, and that backend servers are configured to redirect http requests to https ?
- this is an ssl offload...the problem is the backend servers are doing redirects to http:// not https://. When I use this options the redirects are in fact https:// as they should be but the app is looping over and over......
- Robin_Mordasie1Historic F5 AccountAre your web servers producing html content where you have links such as: Visit W3Schools But you want the F5 to rewrite that content to: Visit W3Schools
- i can email you the http watch if you like...it is basically doing as you said but it is going to a different url which is by design...or so they say....however the same url has the same ip address which i think may be some of the issue......so in general.....302 https://www.website.com/redirection 302 https://www.websitemoreinformation.com/redirection 302 https://website.com/redirection and over and over and over.....www.website.com and www.websitemoreinformaton.com resolve to the same ip address or virtual server.
- Daniel_Tavernie
Cirrostratus
I ran into this on a project:
Setup:- http and https Virtual Servers
- http to https redirect irule
- https offload to http pool
- http profile with Redirect Rewrite: All
- Page would not load correctly (html would load but no CSS or images)
- Fiddler revealed that the application servers were redirecting all content requests to the base uri with a single-sign-on logoff parameter appended...and then redirecting the redirect with a duplicate parameter appended...and then again...
- It looped like this until the redirect had 10+ duplicate parameters and it finally gave up, but never returned the real content.
- Finally determined that Redirect Rewrite was rewriting the Referer header to "https://sub.domain.com/path/", which the application (on http) was rejecting/redirecting.
- Used this iRule to rewrite incoming Referer header to "http://sub.domain.com/path/"
when HTTP_REQUEST { set referer [HTTP::header "Referer"] if { $referer starts_with "https://" } { set httpReferer "http://[string range $referer 8 end]" HTTP::header replace "Referer" $httpReferer } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com