0

When on my homepage and any page other than product pages my SSL works perfectly. When you load a product page the SSL breaks and I see this message in my console:

The page at 'https://www.mywebsite.com/product-page.html' was loaded over HTTPS, but is submitting data to an insecure location at 'http://www.mywebsite.com/checkout/cart/add/uenc/aHR0cDovL3d3dy5uaXRyb3V…p6bGUtc3lzdGVtLmh0bWw_X19fU0lEPVU,/product/1347/form_key/bWcN0O9kodteC8FG/': this content should also be submitted over HTTPS.

I have done the typical base urls settings in magento and quadruple checked sure https is set for the secure base url. I also enable ssl in htaccess file using this:

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

How can change the unsecure location URL? The cart page etc loads with the SSL.

Magento ver. 1.9.0.1

Thank you for your help!

8
  • What are you secure and insecure base URL's and do you have Magento configured to use a secure connection on the frontend? Commented Nov 5, 2014 at 19:48
  • check secure url from admin System > Configuration.>Web> Secure with https otr http
    – Amit Bera
    Commented Nov 5, 2014 at 19:49
  • How did you enable ssl? using .htaccess file, change it to https in your browser or setting unsecure_base_url to https//www.mysite.com? Commented Nov 5, 2014 at 20:49
  • I have done the typical base urls settings in magento and quadruple checked them to match them in this post: magento.stackexchange.com/questions/30758/… @R.S I also enable ssl in htaccess file using this: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ mywebsite.com/$1 [R=301,L]
    – thadw
    Commented Nov 5, 2014 at 20:56

2 Answers 2

1

I wouldn't recommend you to use the ".htaccess" method to force your Magento store to use HTTPS.

What you can do instead is just to change both your Secure and Unsecure Base URL to HTTPS and make sure to remove the ".htaccess" redirect rules.

With both the Secure and Unsecure Base URL with HTTPS, the buttons generated should be running HTTPS as well unless they are hard coded somehow (not likely).

2
  • I have tried this but everytime I save the unsecure url defaults back to http. Uploaded an orginal .htaccess with no luck. Also when rewrites are on I cannot save product changes in admin panel.
    – thadw
    Commented Nov 8, 2014 at 15:06
  • It looks like something may be wrong with your server's mod_rewrite? Anyway try to change the Unsecure URL to HTTPS in your MySQL database (core_config_data table) and see if that works. Commented Nov 10, 2014 at 5:38
0

Head over to your System -> Configuration -> General -> Web -> Secure area from your Magento admin. From there, you'll want to change the field for "Use Secure URLs in Frontend" to "Yes".

I just tested and confirmed that this will render the 'add to cart' button with an HTTPS link instead of HTTP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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