Solved

http and https on same website

Posted on 2004-09-24
4
158 Views
Last Modified: 2013-12-04
I am running windows 2000 advanced server, with a ssl certificate on one of our websites.  SSL appears to be working fine.

I am also running a php script (Oscommerce) that has both 'http' and 'https' links.  When I enable SSL on my website, ALL of the URLS need to start with https, so the http links don't work.  Also, my customers won't know to enter the 's' in front of the http, so that is a bad thing too.

So my question is, is it possible to have both http and https enabled on the same website? or do I have to have a workaround (Subdomains???)

TIA

Grandma
0
Comment
Question by:gobluegrandma
[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
4 Comments
 
LVL 4

Expert Comment

by:beem4n
ID: 12149367
Hi,

yes it is possible, because in default environment
http uses 80 port and https use 443; go harvest you IIS options

anyway, if you cannot run it together you can do such a trick
make a web site, http running on 80 and name it mysite.com
after a user connects to it , redirect it to https://secure.mysite.com

0
 
LVL 12

Expert Comment

by:zvitam
ID: 12154189
here is some more in-depth information:

http://www.codeproject.com/aspnet/WebPageSecurity.asp
0
 

Author Comment

by:gobluegrandma
ID: 12155404
Well, it seems that if I disable the "Enable SSL" in the Web Properties on Information Services, both http and httpS URLS work.  

I was under the assumption that you need to check this option for the SSL to kick in and work. I guess all it does is make ALL the URLS secure.

Thank you for your help
Grandma
0
 
LVL 38

Accepted Solution

by:
Rich Rumble earned 500 total points
ID: 12161451
Yes, you can run both on the same server, http://www.iisfaq.com/?View=A407&Print=1
Typically you'd make a link to the "Secure" version of the site on the "un-secure" site, BUT with IIS I think you have to have a SECOND IP address to use... remember you need a second IP address for using an SSL (aka httpS) site. A Vhost will not use SSL.

or perhaps look at this answer from EE
http://www.experts-exchange.com/Networking/Microsoft_Network/Q_20773279.html
This little piece of vb code accomplishes both. All you have to do is copy this code into notepad and save it as an asp page in your default directory for the site you're working with, then enable it as the default document. This obviously prevents you from running anything else on the default web site...

<%

     If Request.ServerVariables("SERVER_PORT")=80 or Request.ServerVariables("SERVER_PORT")=443 Then
          Dim strSecureStr
          strSecureURL = "https://"
          strSecureURL = strSecureURL & "mail.domain.com"
          strSecureURL = strSecureURL & "/exchange"
          Response.Redirect strSecureURL
     End If
     %>

This code will basically take anything that comes in on port 80 OR port 443 and redirect it to https:// AND /exchange. If you're not redirecting to a virtual directory you'd just take that line out, and it would redirect anything coming in on 80 or 443 to httpS/.

-rich
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The term "Bad USB" is a buzz word that is usually used when talking about attacks on computer systems that involve USB devices. In this article, I will show what possibilities modern windows systems (win8.x and win10) offer to fight these attacks wi…
Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

734 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