HTTP -> HTTPS

  • How can I configure IIS 5 to redirect a website (virtual directory) to a secured site? When users type

    http://www.website.com/website they get an error and I have to tell them to insert a 's' in after the http(s) to make it viewable. Basically I want to configure IIS to automatically redirect them when they type

    http://www.website.com/website or http://www.website.com/website to

    https://www.website.com/website? Can someone please assist me?




    My Blog: http://dineshasanka.spaces.live.com/

  • This is MS official recommendation for Exchange but this idea will work for IIS5 too.

    <--

    To configure IIS 6.0 to automatically redirect HTTP requests as HTTPS requests, follow these steps:

    1. create OWAasp directory under Inetpub\Wwwroot directory.

    2. Create an ASP page named Owahttps.asp that contains the following data, and then save the file at Inetpub\Wwwroot\OWAasp directory:

    <%

         If Request.ServerVariables("SERVER_PORT")=80 Then

             Dim strSecureURL

             strSecureURL = "https://"

             strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")

             strSecureURL = strSecureURL & "/exchange"

             Response.Redirect strSecureURL

         End If

       %>

    NOTE: Do not replaceSERVER_PORT and SERVER_NAME in the code. They are variables and the code snippet should be copy/pasted as it is shown without modification.

    3. Start Internet Services Manager.

    4. Expand Computer Name, and then expand the Web site that your Outlook Web Access users use to access Exchange 2003.

        For example, expand Web Sites.

    5. Right-click this Web site, point to New, and then click Virtual Directory.

    6. Click Next, type OWA_Redirect in the Alias box, and then click Next.

    7. In the Directory box, click Browse and point to c:\inetpub\wwwroot\owaasp.

    8. Click Next, leave the default check boxes selected on the Access Permissions page, click Next, and then click Finish.

    9. Right-click the Exchange virtual directory, and then click Properties.

    10. Click the Custom Errors tab, and then double-click 403.4.

    11. In the Message Type list, click URL.

    12. In the URL box, type /owa_redirect/owahttps.asp, and then click OK.

    13. Click the Directory Security tab.

    14. Under Secure Communications, click Edit.

    15. Click to select the Require secure channel (SSL) check box.

    Note If you want to require 128-bit encryption, click to select the Require 128-bit encryption check box.

    16. Click OK two times.

    Note The Exchange virtual directory and the Public virtual directory are the only virtual directories that you have to configure to require SSL. If you have other virtual directories where you want to require SSL, enable SSL on each virtual directory individually.

    To allow an initial HTTP request from an Outlook Web Access user, make sure that you do not require SSL on the OWA_Redirect IIS virtual directory. If you require SSL on the OWA_Redirect Virtual directory, the initial HTTP connection cannot be established. Additionally, do not require SSL on the root Web site that contains the OWA_Redirect application.

    17. Right-click the OWA_Redirect IIS virtual directory and then click Properties.

    18. On the bottom, under the Application Pool, choose ExchangeApplicationPool. 

    19. Restart the server, or restart the IIS Admin Service. To restart the IIS Admin Service:

    20. Click Start, click Run, type services.msc in the Open box, and then click OK.

    21. In the list of services, right-click IIS Admin Service, and then click Restart.

    22. Click Yes to confirm that you want to restart all the dependent services.

    23. Test for functionality.

    -->

     

  • Thank You veru much




    My Blog: http://dineshasanka.spaces.live.com/

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply