ここに来ている人がいます。私はHTTP
からHTTPS
にすべてのページをリダイレクトするルールがありますが、それはIIS8
で正常に機能しましたが、IIS 8.5では内部サーバーエラー500が発生します。私は欠けているいくつかの構成があると思っていますが、何時間も検索した後、web.config
ファイルのsystem.WebServer
に書かれた書き換えルールのさまざまな変更を試してみてください。IIS 8.5(ASP.NET)と互換性のあるWEB.CONFIGでHTTPからHTTPSへのリダイレクト
<rewrite>
<rules>
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{SERVER_PORT_SECURE}" pattern="^0$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
、単純に(私は可能性があるが、このくそ事がアップグレードされるまでうまく働いていた)MasterPage
でこれを書かなくている - ここで は、コード(作業のいずれも約5バリエーションの一つ)があります私は行方不明のものがありますか?おそらく構成ですか?
(IIS8.5でホストされている別のサイト上で)働いていた別のバージョンが
<rewrite>
<rules>
<rule name="httpsredirect" 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>
魅力的な作品です! – MC9000