I m very noob on the rewrite part, hope someone can help me. Now i m using this
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" negate="true" pattern="^on$" ignoreCase="false" />
</conditions>
<action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="Found" />
</rule>
</rules>
</rewrite>
This only can change http to https only, now I hope it can support to change www to non-www too. What should I do to do it?
Why from web.config? You should allow it from IIS - just add it.