Forum Discussion
Http Redriect Loop
Hi,
I want to do redirect from HTTP to HTTPS. I have set iRule.
when HTTP_REQUEST { HTTP::redirect "https://[HTTP::host][HTTP::uri]" }
On firefox, it loop but on chrome it's working ok. iRule on http virtual server. Virtual server have http and https. Also i have cert ssl install on F5. Please advice.
Thanks.
27 Replies
- What_Lies_Bene1
Cirrostratus
So you are using a single Virtual for HTTP and HTTPS? If that's the case you'll need identify the HTTP traffic and only redirect that. As things stand you are redirecting even the HTTPS.
when HTTP_REQUEST { if { [TCP::local_port] == 80 } { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } } - Zainal_Abidin_1
Nimbostratus
It's still looping. Can see firefox still spin.
- Zainal_Abidin_1
Nimbostratus
I have ssl cert from Go Daddy. I put on F5. What else setting i need to do? Do i need define SSL Profile (client) on http? or on https?
- Kevin_Stewart
Employee
I'm assuming, based on the screen shot, that you actually do have separate VIPs for each port. In that case, you should ONLY apply the redirect rule to the port 80 VIP. On the port 443 VIP, create and apply a client SSL profile with your GoDaddy cert.
- Zainal_Abidin_1
Nimbostratus
I already do what you suggested but browser still loop. Any idea what wrong? Do i need put cert from Go Daddy on apache server?
- Kevin_Stewart
Employee
What happens if you go directly to the port 443 VIP? Is it all browsers or just FireFox? Is the apache server also listening on port 443?
- Zainal_Abidin_1
Nimbostratus
Apache listen only port 80. It just on firefox. Chrome don't have any problem. But our client use firefox.
- Zainal_Abidin_1
Nimbostratus
Internet Explorer version 11 also same. It's loop. On login page our client have set check session. Before this, our client don't have any problem. But after renew certificate, all problem come.
- Kevin_Stewart
Employee
What happens if you go directly to the port 443 VIP? Same issue? Given that the apache server is listening on port 80, you definitely don't need to put the cert there. What indication do you have that it's looping (making repeated requests) and not just failing the SSL negotiation?
- Zainal_Abidin_1
Nimbostratus
Yes, w have same issue when using port 443 VIP. Spinning indicator keep showing and browser keep refresh.
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