Shopping Cart Empty and SSL

7 years ago
When I have SSL enabled and go to my site with this url (and am not logged in):

joyberrybooks.com

If I add an item to the shopping cart... then click open the minicart and click Go to Cart.

it redirects to:

https://www.joyberrybooks.com/en/cart

And apparently this looses my cookies and the cart is empty.

If I disable SSL then it redirects to:

http://joyberrybooks.com/en/cart

and the cart is fine... it is not empty.

Finally if I have SSL enabled and go to:

www.joyberrybooks.com

it redirects to:

https://www.joyberrybooks.com/en/cart

and the cart is not empty.

Any help on how to allow both joyberrybooks.com and www.joyberrybooks.com to work with SSL?

Note: tested on Firefox / Mac and Chrome / Mac; nopCommerce v3.0
7 years ago
You need to add following rewrite rule under <system.webserver> node in Web.Config

<rewrite>
    <rules>
        <rule name="Redirect yoursite.com to www.yoursite.com" patternSyntax="Wildcard" stopProcessing="true">
            <match url="*" />
            <conditions>
                <add input="{HTTP_HOST}" pattern="yoursite.com" />
      </conditions>
            <action type="Redirect" url="http://www.yoursite.com/{R:0}" redirectType="Permanent" />
        </rule>
  </rules>
</rewrite>
7 years ago
Proper redirection will help you from .domainname.com to www.domain.com otherwise there is no issue in SSL Certificate. I think after proper redirection it works fine with ssl.