Groups | Blog | Home
all groups > iis security > october 2003 >

iis security : http:// to https:// redirect


stp
10/27/2003 1:29:03 PM
Does anyone know how to redirect http:// requests that hit
a SSL site automaticlly to https:// ??? I'm not a
programmer so please go easy on my... :-)

Thanks!!!
Robert Moir
10/27/2003 10:00:20 PM
[quoted text, click to view]

Haven't tested it, but creating a custom error page for the SSL required
error code (HTTP 403.4 - Forbidden: SSL required) that contains a
meta-redirect to your "start" page for the https stuff ought to do it.

Karl Levinson [x y] mvp
10/28/2003 5:22:34 AM

[quoted text, click to view]

Agreed. Additionally, you could put the same script as above into an HTM or
..ASP page in the appropriate place [e.g. at the root of the server, if you
don't want ANY http:// use of that server] such as default.htm and make that
page the default page for that folder using the IIS MMC.

Putting the code into the HTTP 403.4 error code could be tricky if you ever
host more than one web site on that server... unless you added some
additional tricks, by default everyone would be redirected to one of the web
sites on the server, and if you have more than one web site on that server,
it might not be the right one.

You can search www.iisfaq.com or www.google.com for some ways to do
redirects. One method is a META REFRESH statement in an HTML page [so
search google for meta-refresh]. Another way would be to use a
Response.Redirect statement in an .ASP page [though you may not be able to
use .ASP pages for server error messages like HTTP 403.4 as suggested
above]. There are other ways to do refreshes as well.


Keith W. McCammon
10/28/2003 8:33:15 AM
http://support.microsoft.com:80/support/kb/articles/Q239/8/75.asp

[quoted text, click to view]

AddThis Social Bookmark Button