Solved

Redirect to HTTPS

Posted on 2014-01-29
3
408 Views
Last Modified: 2014-01-30
Hi There,

For the life of me I cannot get the http to redirect to https. Everything is supposed to be secure but as of now you can get to the non-secure version.

If I enable the redirect from within the IIS gui to "https://<FULL DOMAIN>" and then go to the site, I get a message that the site is in an infinite loop?

Thanks for your help!
0
Comment
Question by:chspayroll
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 39819241
you can use the urlrewrite
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
  <match url="(.*)" />
    <conditions>
      <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
  <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>

Open in new window


or a custom error page to redirect to https
http://www.sslshopper.com/iis7-redirect-http-to-https.html
0
 

Author Comment

by:chspayroll
ID: 39819288
Thanks, I've installed the url rewrite module but I can't reboot until later, I'll keep you posted
0
 

Author Closing Comment

by:chspayroll
ID: 39820922
Perfect! But I had to use the following code:

<rewrite>
      <rules>
      <rule name="HTTP to HTTPS redirect" stopProcessing="true">
              <match url="(.*)" />
                <conditions>
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                </conditions>
              <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
      </rule>
      </rules>
      </rewrite>
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question