Server
HTTP – HTTPS Redirection via IIS
Many hosting control panel Windows servers redirects incoming requests as http automatically as https, but some hosting control panels and when they run the site via non-panel IIS don’t support http – https redirections. In these cases, you need to redirect via your web.config file or via IIS. In this article, we will go through redirection operation step-by-step.
Firstly, connect to the server and IIS.
- Find your website under Sites at the left menu and click “URL Rewrite” button.
- Click “Add Rule(s)” button on the right menu.
- Click “Blank Rule” button on the pop-up window.
- You can fill “name” field in the pop-up window as you wish. Type ^OFF$ to the pattern section.
- Come to the Condition section and click “Add” button. Type {HTTPS} to the Condition input section and ^OFF$ to the Pattern section in the pop-up window, and then click “OK”.
Condition input – Pattern
- In the end, come to the Action section and select “Redirect” as “Action Type”, type https://{HTTP_HOST}/{R:1} to the Redirect URL section and select 303 as “Redirect type”.
- Your actions are complete, now the only thing you need to do is to apply the actions you’ve done. Click “Apply” button on the right menu.