Link to home
Start Free TrialLog in
Avatar of kristinaw
kristinawFlag for United States of America

asked on

IIS and https

Everyone,

I have a site I'm currently running over port 80. My users go to http://something.domain.com to access the site. I would like to attach a certificate to the site, but don't want my users to have to type in httpS:// to get to it. Is there a way I can allow them to access the site as they always have, and have it automatically bounce over to the https:// address?

Thanks, let me know if I haven't been too clear.

Kris.
ASKER CERTIFIED SOLUTION
Avatar of koquito
koquito

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kristinaw

ASKER

I came up with my own solution to this. Please delete question.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Joe,

I tried what koquito suggested and couldn't get it to work right from the outside. So, I found some VBscript code that automatically redirects the user over to 443. I'll look it up tomorrow at work at post the steps I took for you.

Kris.
Avatar of joedboswell
joedboswell


Kris,

Thanks, I appreciate it!

Joe
Joe,

Here's what I did. This was request originally had to do with my OWA site. I didn't want people to have to type the stupid /exchange to get into it, or put the httpS either. 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. In my case, this obviously prevents me from running anything else on the default web site, but that's OK for me.

<%

      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/.

hth,
Kris.