0

I'm trying to set up HTTPS. SSL certificate is installed. I can access any page of my store using HTTPS, even the home page. I would like to set up the home page so when a customer opens http he or she redirects to https.

Unsecure and Secure fields in the config are set to: https://timeleader.ru/

I get too many redirects when I'm trying to rewrite http to https in .htaccess.

I use standard magento .htaccess, but I had to add: "SetEnv HTTPS On", otherwise it will not work at all.

Thank you in advance.

0

Just add this in your htaccess file on the first line before Magento starts.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://timeleader.ru/$1 [R=301,L]

This will redirect everything on your website to "https". Hope I have helped!

  • Thank you for the fast reply, unfortunately, i get: ERR_TOO_MANY_REDIRECTS when i open http : / / timeleader.ru – Konstantin Apr 17 '17 at 14:16
  • All your files in the Magento installation must be 644 and for the directories - 755. Ask your hosting provider to run a command to rewrite every files and directory permission to respectively 644 and 755. After the command is ran change the permission of the local.xml to 400 and the mage file in the main directory to 550. After that add again the lines in the htaccess file. – Dankata Apr 17 '17 at 14:21
  • I think the ERR_TOO_MANY_REDIRECTS could be happening because some permissions are mistaken. – Dankata Apr 17 '17 at 14:23
  • Also try changing the unsecure field in the config of Magento to simply "HTTP" and leave the secure field to "HTTPS" and add again the lines in your htaccess file. – Dankata Apr 17 '17 at 14:28
  • Thank you Dankata. The last your comment is also problem with too many redirects, checking on the solution with permissions... – Konstantin Apr 17 '17 at 14:53
0

Got a solution from the hosting company.

RewriteCond %{HTTP:Front-End-Https} !on RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

Thank you all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.