2017-10-06 14 views
0

SSL認証に基づいてASP.NET MVCサイトをhttps://example.comとしてホストしました。
ユーザーがhttp://example.comに移動すると、自動的にhttps://example.comにリダイレクトされます。
可能な方法はありますか? URL書き換えモジュールをインストールし、​​であなたのweb.configファイルに以下を追加自動的にhttps urlに移動

+0

誰もがJSPサーブレットページで同じことを行う方法を助けることができますか? –

答えて

1

<rewrite> 
    <rules> 
     <rule name="Redirect to HTTPS" stopProcessing="true"> 
      <match url="(.*)" /> 
      <conditions> 
       <add input="{HTTPS}" pattern="^OFF$" /> 
      </conditions> 
      <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" /> 
     </rule> 
    </rules> 
</rewrite> 
関連する問題