Solved: Solution for How to Redirect non www to www in NopCommerce

The easiest method is to update your web.config file inside the <system.webServer> node with...

              <rule name="Redirect to WWW" stopProcessing="true">
                  <match url=".*" />
                      <add input="{HTTP_HOST}" pattern="^$" />
                  <action type="Redirect" url="{R:0}" redirectType="Permanent" />

This will keep your pages, URL parameters, links etc intact but redirect from NON-WWW to WWW of your domain name. It's also an SEO friendly method.

Post a Comment