Here we are, and today let's see how to do a redirect IIS 7 Default Web Site to Owa directory and from http to https, clearly automatically.
Http to Https redirect
Create a httpredirect.htm file and save it to C:\InetPub
Copy and paste the following code below:
var httpURL = window.location.hostname + window.location.pathname;
var httpsURL = "https://" + httpURL ;
window.location = httpsURL ;
p.s: add < before the script word on first line and last line :-)
Set the new 403 error page to use this file instead of the regular error file
You can do it at the SERVER or SITE level.
Select the server name on the left side under “Connections” than Under the “features view” on the right side, double click “Error Pages”
select “Add...” and than set the status code as “403.4″ and Set the file to “C:\Inetpub\httpsRedirect.htm”
Now carefull to select the error code 403.4 and press “Edit Feature Settings…”
From now if you go to HTTP http://www.yourowasite.com/ you should not get a 403.4 error
but redirect to HTTPS!!!
Redirect Default Web Site to Owa
If you decided to publish your Exchange 2010 owa and one user connet to the site https://mail.owa.com/ the IIS7 Welcome Page is returned. IMHO it's not very elegant.
On Default Web Site click "Http Reditect"
.. and than set the " Redirect requests to this destination:" to /owa and also "Only redirect requests to content in this directory (not subdirectories)
See you soon ... :-)