Redirect from HTTP to HTTPS - IIS 7.5

前端 未结 5 1762
孤独总比滥情好
孤独总比滥情好 2021-01-04 19:08

I have implemented https on my application and now i\'m trying to make IIS redirect all http request to https, so that the user doesn\'t even notice this change.

I h

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-04 19:30

    Redirect from HTTP to HTTPS in IIS 7

    URL Rewrite is tightly integrated with IIS Manager for better management(Download from https://go.microsoft.com/?linkid=9722532)

    enter image description here

    Configure Rule Settings

    Match URL tab:
    name= Redirect 2 HTTPS
    url= (.*)

    Conditions tab: add record
    input= {HTTPS}
    pattern= ^OFF$

    Action tab:
    type= Redirect
    redirection URL= https://{HTTP_HOST}/{R:1}
    redirectType= Permanent

提交回复
热议问题