1. Install URL Rewrite Module from the link below:
http://www.iis.net/downloads/microsoft/url-rewrite
2.Open your web.config file and add the below code above </configuration>
<system.webServer>
<httpRedirect enabled="false" destination="" httpResponseStatus="Found" />
<rewrite>
<rules>
<rule name="HTTP to HTTPS Redirection" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
</rule>
</rules>
</rewrite>
</system.webServer>
like below image:
http://www.iis.net/downloads/microsoft/url-rewrite
2.Open your web.config file and add the below code above </configuration>
<system.webServer>
<httpRedirect enabled="false" destination="" httpResponseStatus="Found" />
<rewrite>
<rules>
<rule name="HTTP to HTTPS Redirection" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
</rule>
</rules>
</rewrite>
</system.webServer>
like below image:
And that's it , your site is now redirecting from http to https automatically.....
Note: If you got any error, mostly are "505 error" then reinstall the module ... (To uninstall URL rewrite go to add and remove programs in control panel and search for IIS URL rewrite)...
Happy SharePoinitng...have a nyc Day...:p
****This is my 100th Post***HAPPY SHAREPOINTING***
No comments:
Post a Comment