0

I am trying to enforce https on an existing magento website, so far so good, the website gets always correctly redirected to the https URL configured in the backend.

As of my understanding the correct way to redirect the old http urls is with a 301 permanent redirect. However I am not sure my configuration is correct since from the network developer tool I see this pattern 301 -> 302 -> 200 (as in the following image).

enter image description here

Is this correct or should I investigate further?

Information about the server: Magento 1.8.1; Ubuntu 16.04; Apache 2; Php 5;

0

Ok, I found out what the problem was about.

Instead of configuring the unsecure URL with the https one, I configured the url with the http one and then modified the .htaccess to handle the redirect as follows:

## http to https redirect 301 ##

    RewriteCond %{HTTPS} off [OR]
    RewriteCond %{HTTP_HOST} ^www\. [NC]
    RewriteRule ^ https://your.url.here.com:8444%{REQUEST_URI} [R=301,L,NE]

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.