locked
Redirect from http to https RRS feed

  • Question

  • User1104884161 posted

    i got few link and they suggest to use below rule to redirect from http to https

    those site urls are https://blogs.technet.microsoft.com/dawiese/2016/06/07/redirect-from-http-to-https-using-the-iis-url-rewrite-module/

    http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/

    <rewrite>
    	<rules>
    		<rule name="Redirect to http" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
    			<match url="*" negate="false" />
    			<conditions logicalGrouping="MatchAny">
    				<add input="{HTTPS}" pattern="off" />
    			</conditions>
    			<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
    		</rule>
    	</rules>
    </rewrite>

     i just like to know if i copy paste the above rule then job will be completed or do i need to configure more things like attach certificate with iis and change some property of the project. please guide me in details.

    Saturday, November 25, 2017 8:32 PM

Answers

  • User-460007017 posted

    Hi bappa1974,

    Just ensure you could access both http and https site directly. Then you only need to copy and paste it to the root web.config <rewrites>section  of your website. Nothing else need to be done for the redirection.

    Best Regards,

    Yuk Ding

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, November 27, 2017 2:33 AM

All replies

  • User-460007017 posted

    Hi bappa1974,

    Just ensure you could access both http and https site directly. Then you only need to copy and paste it to the root web.config <rewrites>section  of your website. Nothing else need to be done for the redirection.

    Best Regards,

    Yuk Ding

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, November 27, 2017 2:33 AM
  • User1104884161 posted

    thanks for reply.

    if site is only accessible by http protocol and does not work with https then what i need to do......give me a step by step article link to enable my site for https protocol. thanks

    Monday, November 27, 2017 2:12 PM