Keywords: Magento - Microsoft Azure - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: 348492cc-a12d-a974-5d3d-9febff74c70a
Description:
This post refers to an old post created on 20-Jul-20
Then again a post dated 09-Aug-20
In fact we are facing this issue for the past 5 months in the website mymbt.net. We had been getting the "ERR_TOO_MANY_REDIRECTS" error once we run the bncert-tool to do the redirection. After two posts in the Bitnami forum which went unresoled. We have refered it to the Microsoft Azure Support team. After MS support the admin dashboard rediected from HTTP to HTTPS after changing in the below configurations Admin Dashboard from No to Yes.
a. Use Secure URLs in the frontend.
b. Use Secure URLs in the Admin.
Checked the offload header as SSL_OFFLOADED.
The redirect from HTTP to HTTPS doesnot work on main page i.e. mymbt.net with below .htaccess file –
File 1-
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ [https://%25%7Bhttp_host%7D%25%7Brequest_uri%7D/]https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
File 2-
RewriteCond %{HTTPS} off
RewriteRule ^ [https://%25%7Bhttp_host%7D%25%7Brequest_uri%7D/]https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE
Currently it stands like this:-
- The site works perfectly when we enter the secure URL directly i.e. https://www.mymbt.net
- The site will not auto redirect when unsecure URL is entered i.e. http://www.mymbt.net
- The admin of the site i.e. Magento Admin will auto redirect. So the URL mymbt.net/admin takes automatically to https://www.mymbt.net/admin
Code from the Bitnami support tool - 348492cc-a12d-a974-5d3d-9febff74c70a
In our post dated 09-Aug-20 in the same forum we were told to create a similar instance in Azure. We couldnot locate Ububtu 16.04 image in the Bitnami repository on the Azure marketplace. Maybe it had been deleted. Later we found one that we had taken for testing in one of our tenents in Azure. We did as suggested by @michiel. Strangly the new site in the new instance gave the same "ERR_TOO_MANY_REDIRECTS" error. We have hosted the domain contient.in on the said instance. We did run the support tool in the new instance as well.
Code from the Bitnami support tool - c34d8ddf-e990-adf4-5209-35914cb367fd