1

I wanted to use https for all pages.

For this I tried changing unsecured base URL to https in web configuration and in back-end.

But at that time,the page is not loading at all, error is "too many redirects"

I am running in localhost,but used servo to get forwarding and there by using https.

This is how my htaccess file looks like

<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
1

Add the following line to your .htacess file of your magento root:

SetEnvIf X-Forwarded-Proto https HTTPS=on

Now test the frontend it should work.

7
  • <IfVersion < 2.4> order allow,deny deny from all </IfVersion> <IfVersion >= 2.4> Require all denied </IfVersion> SetEnvIf X-Forwarded-Proto https HTTPS=on Is this what you meant,or do we need tags ? – Jerin Cherian Dec 18 '18 at 9:33
  • I get the following error Mixed Content: The page at 'gladius.serveo.net/magento3' was loaded over HTTPS, but requested an insecure favicon 'gladius.serveo.net/magento3/pub/static/version1545123586/…'. This request has been blocked; the content must be served over HTTPS. – Jerin Cherian Dec 18 '18 at 9:34
  • I am not able to open the url you have shared. – Sukumar Gorai Dec 18 '18 at 10:15
  • Its not an url,thats the error I get,I will paste the entire error in the next comment – Jerin Cherian Dec 18 '18 at 10:16
  • Mixed Content: The page at 'gladius.serveo.net/magento3' was loaded over HTTPS, but requested an insecure favicon 'gladius.serveo.net/magento3/pub/static/version1545123586/…'. This request has been blocked; the content must be served over HTTPS – Jerin Cherian Dec 18 '18 at 10:17
0

You can use .htaccess in apache

RewriteCond %{HTTP_HOST} !^localhost$
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
4
0

What I finally did was to install https for localhost

here is a link to the tutorial I used https://www.youtube.com/watch?v=TH6evGKgy20

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.