How would I create an automatic redirect from the http to the https site in Windows Server 2008 R2?

I need to create an automatic redirect from http to the https site.
I asked a similar question in Expert Exchange and was told to use http redirect in IIS 7. However, this does not work as it creates an endless loop that can not be resolved by Firefox.  There must be other ways of solving this issue. Please advise. Thanks
PDSWSSAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Neil RussellTechnical Development LeadCommented:
You configured it wrong then! All you would do is create an HTTP redirect in IIS7 to the HTTPS://sitename.org
0
PDSWSSAuthor Commented:
Looks pretty simple. Did not expect issues.

Since 443 is already taken the

http redirect is to  https:/www.sitename.edu:8000     The https site connects perfectly everytime.

I have attached the configuration that I used. Is there something wrong here?  Thanks,
Picture-3.png
0
PDSWSSAuthor Commented:
I have attached the message I get from Firefox when I attempt to redirect from http to the https site

I have tried this on two different servers and get identical behavior. Thanks
Picture-4.png
0
Defend Against the Q2 Top Security Threats

Were you aware that overall malware worldwide was down a surprising 42% from Q1'18? Every quarter, the WatchGuard Threat Lab releases an Internet Security Report that analyzes the top threat trends impacting companies worldwide. Learn more by viewing our on-demand webinar today!

TAWpowerCommented:
IIS 7.5 works different than 7... A bit painful. I used this technique...

http://www.thomasmaurer.ch/2010/11/how-to-redirect-sites-to-https-in-iis-7-5/

0
Brad HoweDevOps ManagerCommented:
Hi,

A typical example is this URL: http://www.domain.com. If you follow it you will see that browser gets redirected to https://www.domain.com.

To do this, you need the rewrite module.

URL Rewrite Module
http://www.iis.net/download/URLRewrite

With URL Rewrite Module you can perform this kind of redirection by using the following rule:

<rule name="Redirect to HTTPS" stopProcessing="true">
  <match url="(.*)" />
  <conditions>
    <add input="{HTTPS}" pattern="^OFF$" />
    <add input="{HTTP_HOST}" pattern="^www\.domain\.com" />
  </conditions>
  <action type="Redirect" url="https://www.domain.com/{R:1}" />
</rule>

Cheers,
Hades666
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PDSWSSAuthor Commented:
TAWPower:

Followed the instructions in your link to redirect by editing the 403 page. However, did not work.  No different than not editing the 403 page. Still get error.

Is there anything that is left out of these instructions to successfully configure the redirect from http?  Thanks
0
PDSWSSAuthor Commented:
Hades666

In both places below where text =  www.\domain\.com     and    https://domain.com
I should replace with the URL of my site or just for the second one?

In addition because  443 was already taken  the  https  address  = https://www.domain.edu:port#   Will this type of address work in this configuration? Thanks

<add input="{HTTP_HOST}" pattern="^www\.domain\.com" />
  </conditions>
  <action type="Redirect" url="https://www.domain.com/{R:1}" />
0
PDSWSSAuthor Commented:
I meant to give Hades666 the 500 points. Please reopen so I can make it right.  Thanks
0
PDSWSSAuthor Commented:
Thanks. All the other solutions were wrong.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSL / HTTPS

From novice to tech pro — start learning today.