I have a nopcommerce 3.0 store in a subdirectory (application) of the site, and that works fine:
mysite.com/mystore/
I've installed SSL certificates on the site for mysite.com and www.mysite.com, with redirects in the site web.config to force everything to https://mysite.com . That works well for pages in the main site.
Now, I'm trying to set up the store to use SSL, and am running into problems where it is adding "mystore/" to urls that already have it. For example, the link to the public store in the admin area points to https://mysite.com/mystore/, but when I click it, it goes to https://mysite.com/mystore/mystore, which of course doesn't exist.
What I've tried:
Under General and Miscellaneous Settings, Security Settings tab, check "Force SSL for all site pages".
Under the Store settings, I've got:
Store URL: http://mysite.com/mystore/ SSL Enabled: Checked Secure URL: https://mysite.com/mystore/
This combination ends up duplicating /mystore/ in some of the links, including when you type https://mysite.com/mystore/ directly in the browser - it goes to the "page not found" of https://mysite.com/mystore/mystore/
Once there, clicking on a category link works: https://mysite.com/mystore/mycategory , but the images on the pages don't show because they are being looked for in mystore/mystore/content.
Adding: I reversed all those settings, cleared cache, restarted the application - and the symptoms remain. Somewhere it is storing that it is https and adding /mystore/mystore/ to some of the pages/resources. So, I can't even get back to a working non-https store.
And one more result: after reversing the settings, the non-https store was working normally in a different browser. I cleared browser cache, and my main browser is now working.
Still left with: how to I put the SSL settings back in without breaking the store?
Under General and Miscellaneous Settings, Security Settings tab, check "Force SSL for all site pages".
Under the Store settings:
Store URL: https://mysite.com/mystore/ (Note the https, not http) SSL Enabled: UNCHECKED Secure URL: BLANK
I now have a store that works with an https address, but it will not force an https address. If you enter the store typing http://mysite.com/mystore/, you'll remain as http. If you enter the store typing https://mysite.com/mystore/, it remains https.
And finally, I left the above settings, and added a rewrite section in the store's web.config to direct http to https. (The store itself takes care of www.mysite.com to mysite.com)
So, to make it work with the store in a sub application folder, it's done by setting https as the store's main url, not setting a secure url, not checking enable SSL, but do set Force all pages to SSL (haven't tested if that is needed), and add a rewrite rule yourself in the store's web.config to switch http to https.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hai ancora qualche domanda o hai bisogno di aiuto?