Home » Forum

Forum

http to https redir...
 
Notifications
Clear all

http to https redirect iis


geekfrisk
(@geekfrisk)
Member Admin
Joined: 3 years ago
Posts: 19
Topic starter  

How to change the domain from HTTP to HTTPS

This topic was modified 2 years ago by geekfrisk

Quote
Topic Tags
geekfrisk
(@geekfrisk)
Member Admin
Joined: 3 years ago
Posts: 19
Topic starter  

To navigate the domain from HTTP to HTTPS, we need to add the  rule in the web config file

<system.webServer>

<rewrite>
<rules>

<rule name="HTTPS force" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
</rules>
<rewriteMaps>
<rewriteMap name="MapProtocol">
<add key="on" value="https" />
<add key="off" value="http" />
</rewriteMap>
</rewriteMaps>


</rewrite>

</system.webServer>

 

Example: djobbuzz using the same configuration for HTTP to HTTPS

 


ReplyQuote
Share: