https links kept get redirected to http

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anni tempo fa
I'm using v1.7. I wanted to run the site entirely in https but NopCommerce kept redirect some links (not all) to the http version. As an example:

1. Go here: https://shop.tkaraoke.com/default.aspx
2. Click on "About Us" on the left navigational bar. This will land to http://shop.tkaraoke.com/aboutus.aspx

Note that the final URL is (2) is http and not https. Any quick fix to this issue? TIA.
13 anni tempo fa
Open AboutUs.aspx.cs file and replace
public override PageSslProtectionEnum SslProtected
        {
            get
            {
                return PageSslProtectionEnum.No;
            }
        }

with
public override PageSslProtectionEnum SslProtected
        {
            get
            {
                return PageSslProtectionEnum.Yes;
            }
        }


P.S. Do the same for all other pages
13 anni tempo fa
Thanks for the code. BTW, this issue happen on a product page as well (not a static page like aboutus.aspx). Where do I make the change so that a product link don't get redirected to http?
13 anni tempo fa
See the answer above...
..."Do the same for all other pages" (Product.aspx.cs)
13 anni tempo fa
Just made 29 replacements and working great. Just paid $50 for the "powered by" removal. Great work, keep it up.

P.S. While paying $50, selecting Paypal method kept result in 404 - file not found. You guys should double check.
7 anni tempo fa
V  3.5 bug: in NopHttpsRequirementAttribute.cs Line 34 (missing else)
==================================================================================
            if (securitySettings.ForceSslForAllPages)
                //all pages are forced to be SSL no matter of the specified value
                this.SslRequirement = SslRequirement.Yes;
==================================================================================
7 anni tempo fa
Lello wrote:
V  3.5 bug: in NopHttpsRequirementAttribute.cs Line 34 (missing else)
==================================================================================
            if (securitySettings.ForceSslForAllPages)
                //all pages are forced to be SSL no matter of the specified value
                this.SslRequirement = SslRequirement.Yes;
==================================================================================

Everything is correct. Why do you think it's the bug?
7 anni tempo fa
My opinion is:
==============================

            if (securitySettings.ForceSslForAllPages)
            {
                //all pages are forced to be SSL no matter of the specified value
                this.SslRequirement = SslRequirement.Yes;
            }
            else
            {
                //all pages are displayed in normal http (or https) mode
                this.SslRequirement = SslRequirement.NoMatter;
            }
7 anni tempo fa
It should not be set this way. Default value is passed a parameter to constructor
7 anni tempo fa
In the costructor option "SslRequirement.NoMatter" is missing (see screenshot)

======================================

========================================
NOTE: If I deselect this option, your costructor automatically set "SslRequirement.No"

.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.