Setup IIS6 to forward all http to https
7:17 PM
The following steps can be used in IIS6 to redirect all http traffic to the same URL but with HTTPS.
2) Expand the Computer Name
3) Expand Web Sites
4) Right click the web site we wish to modify
5) Select "Properties"
6) Select the "Directory Security" tab
7) Select "Edit" in the Secure Communications section
8) Check off the "Require secure channel (SSL)" option. (This will only allow pages on this site to be viewed only with https.)
9) Press OK and close all Properties windows
1) Open Notepad and copy in the following code below
2) Go to File > Save as and save this file as HttpRedirect.htm, and save the file to C:\Inetpub directory.
2) Expand Web Sites
3) Right click the web site you wish to modify
4) Select "Properties"
5) Select "Custom Errors" Tab
6) Select the "403;4? error
7) Press the "Edit" button
8) Browse to and Select the HttpRedirect.htm file in C:\Inetpub
9) Press OK and close all Properties windows
Step 1 - Verify SSL is required for the selected site
1) Open IIS Manager (Start Menu\Programs\Administrative Tools or %SystemRoot%\system32\inetsrv\iis.msc)2) Expand the Computer Name
3) Expand Web Sites
4) Right click the web site we wish to modify
5) Select "Properties"
6) Select the "Directory Security" tab
7) Select "Edit" in the Secure Communications section
8) Check off the "Require secure channel (SSL)" option. (This will only allow pages on this site to be viewed only with https.)
9) Press OK and close all Properties windows
Step 2 - Create a HttpRedirect.htm file and save it to C:\InetPub
We will be creating an HTM file containing the following code. We will save this file to C:\Inetpub.1) Open Notepad and copy in the following code below
2) Go to File > Save as and save this file as HttpRedirect.htm, and save the file to C:\Inetpub directory.
<!-- beginning of HttpRedirect.htm file --> <script type= "text/javascript" > function redirectToHttps() { var httpURL = window.location.hostname+window.location.pathname; window.location = httpsURL ; } redirectToHttps(); </script> <!-- end of HttpRedirect.htm file --> |
Step 3 - Set the 403 error page to use this file instead of the regular error file
1) Expand the Computer Name2) Expand Web Sites
3) Right click the web site you wish to modify
4) Select "Properties"
5) Select "Custom Errors" Tab
6) Select the "403;4? error
7) Press the "Edit" button
8) Browse to and Select the HttpRedirect.htm file in C:\Inetpub
9) Press OK and close all Properties windows
0 comments