Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect from HTTP to HTTPS ? 1

Status
Not open for further replies.

mmendes

IS-IT--Management
Jun 20, 2002
149
0
0
US
Hello all,
I am starting to get my feet wet with Server 08 and IIS7 in a test environment. My first question is how can I set thing up so that my users do not have to type into their browser to get to any of the IIS sites? With IIS6, what I would normally do is create a "welcome page" that was not using SSL, that would come up by default. I would require SSL on all other folders/sites and add the appropriate URl's as clickable links on this "welcome page".

So my questiopns is either how can I do this on IIS7, or how can I make IIS7 automatically redirect them to SSL even when they don't type HTTPS in their address bar?

Thanks,
Mike
 
I think I found my own answer. This procedure is simple and works:


Go to the Error Pages feature in IIS Manager, and click "Add"

Now, add your own error handler for 403.4 errors, and choose either your own
custom page, or choose the "302 redirect option" and redirect to wherever you want to redirect to.
 
On the site you want them to be redirected, create a file called default.asp. Open it with notepad and type this on one line:

<% response.redirect " %>


I did this for Exchange on my "Default Web Site" so it would redirect users to HTTPS. (i.e. <% response.redirect " %>


*When you create that file, make sure you add default.asp in your "Documents" tab in IIS for the site you want redirection to occur.
 
forgot to add something. after you add default.asp, move it to the top of the "Documents" list.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top