Results 1 to 4 of 4

Thread: Redirect HTTP to HTTPS in IIS 10 / Windows 2016

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Redirect HTTP to HTTPS in IIS 10 / Windows 2016

    I am looking to redirect HTTP access to HTTPS in IIS 10 / Windows 2016 for a web site that I'm working with.

    I was able to add the HTTP REDIRECT "role" to the server - and can see that in IIS. But setting it up seems a bit more complicated then a single setting in IIS.

    Thanks!

    Steve

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,392

    Re: Redirect HTTP to HTTPS in IIS 10 / Windows 2016


  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Redirect HTTP to HTTPS in IIS 10 / Windows 2016

    Quote Originally Posted by szlamany View Post
    I am looking to redirect HTTP access to HTTPS in IIS 10 / Windows 2016 for a web site that I'm working with.

    I was able to add the HTTP REDIRECT "role" to the server - and can see that in IIS. But setting it up seems a bit more complicated then a single setting in IIS.

    Thanks!

    Steve
    @Steve, Does this helps?

    https://docs.microsoft.com/en-us/iis.../httpredirect/
    Please mark you thread resolved using the Thread Tools as shown

  4. #4
    New Member
    Join Date
    Mar 2020
    Location
    India
    Posts
    3

    Re: Redirect HTTP to HTTPS in IIS 10 / Windows 2016

    You can use URL rewrite in IIS and use below code in web config

    Code:
    <rewrite>
        <rules>
            <rule name="http to https" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                    <add input="{HTTPS}" pattern="^OFF$" />
                </conditions>
                <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
            </rule>
        </rules>
    </rewrite>
    Or you can also do it using ASP.NET

    check this link

    https://qawithexperts.com/questions/...ttps-in-aspnet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width