最近私のasp.net MVC Webサイトをhttpsに切り替えて、既存のすべてのトラフィックをウェブでhttps://www.example.comにリダイレクトしたい.configリライト。Web.config http + wwwとhttp non wwwとhttps以外のwwwをhttps:// wwwに書き換えます
私はさまざまな組み合わせを試みましたが、まだ成功していません。
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Permanent"
url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
https://stackoverflow.com/questions/17714732/web-config-redirect-non-www-to-www/17715586#17715586助けてもらう – Satpal