locked
How to redirect from within a HTTP page to a HTTPS page - IIS 8, URL Rewrite 2.0 Module RRS feed

  • Question

  • User1304932964 posted

    I have looked at the other answers on this site and on Google but nothing is quite helping me in my issue.  

    I am running Windows Server 2012 with IIS 8.0 and the URL Rewrite 2.0 module installed.  I have a website in which both HTTP and HTTPS bindings are allowed.  However, there is a link to a secured page on my site which requires SSL certs.  

    Diagram

    If I enter my page via HTTPS and click on the secured link, it prompts for my smart card token, finds and authenticates my SSL cert and is able to take me to the page.  However, if I enter my page via HTTP, I am only able to see the home page.  If I click on the secured link, it immediately throws an HTTP 500 error.  

    I've Googled for how to redirect HTTP to HTTPS and have installed URL Rewrite 2.0.  I created some inbound/outbound rules where if a pattern matches http://mypage.com/securedpage, I will rewrite to https://mypage.com/securedpage.  However, nothing I've tried works.  

    I want the user to be able to enter via HTTP, click the secured link and be redirected to the HTTPS side of things whereupon they will be prompted to present a smart card token.  

    Any help would be greatly appreciated.

    Thursday, March 26, 2015 12:07 PM

Answers

  • User1183424175 posted

    Hi,

    How do you link to https from home page? I've tested with "a" tag in a simple html page and I can link to https from http page. So I suggest that you can try enable Failed Request Tracing in IIS to troubleshooting.

    And as a workaround, you can firstly link to http and then redirect the special page from http to htts via IIS url rewrite module.

    For more information, please refer to the document:

    #Troubleshooting SSL related issues

    http://blogs.msdn.com/b/saurabh_singh/archive/2007/09/05/troubleshooting-ssl-related-issues-with-iis.aspx

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Friday, March 27, 2015 2:41 AM