WWW prefix requirement not working

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
Thanks a lot!

<rewrite>
    <rules>
        <rule name="Redirect domain.com to www" patternSyntax="ECMAScript" stopProcessing="true">
            <match url=".*" />
            <conditions>
                <add input="{HTTP_HOST}" pattern="^domain.com$" />
            </conditions>
            <action type="Redirect" url="http://www.domain.com/{R:0}" />
        </rule>
    </rules>
</rewrite>

That's work fine.
7 лет назад
I still believe this is a bug with the current implementation though. Any way the nop team could take a look at this? It should work for both http and https implementations.
6 лет назад
even after using url rewrite it doesnt fix it for me. and to worsen it, the site stopped working and threw 500 error.
один год назад
For those who are having difficulties with versions older than 3.9. The problem for me was to specifically set the security url. You must leave it blank (or put without 3w to hack the logic) for nopcommerce to automatically detect it. Because before he checks whether or not 3w exists, he uses the url saved in this field, according to the method GetStoreHost:

result = !String.IsNullOrWhiteSpace(currentStore.SecureUrl) ?
                        //Secure URL specified.
                        //So the store owner doesn't want it to be detected automatically.
                        //In this case let's use the specified secure URL
                        currentStore.SecureUrl :
                        //Secure URL is not specified.
                        //So the store owner wants it to be detected automatically.
                        result.Replace("http:/", "https:/");
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.