This is not as easy as it sounds. Here is what I done.
By default, IIS7 has built-in automatic HTTP Redirect feature which allows us to redirect to any URL without us having to write any custom scripts.
To accomplish the task, you can follow these steps on the CAS server role hosting OWA:
Step 1:
0, install http redirect feature in the IIS role
1,Log on Interne Information Services (IIS) Manager
2, Switch back to Features view of the "Default Web Site" and double click on "Error Pages".
3, In the Actions pane, click on "Edit Feature Settings" and under "Error Responses", select: "Custom Error Pages". Then click OK
4, In the Actions pane, click on "Add" and configure the following
a) Status code: 403.4
b) Click on Respond with a 302 redirect and provide the absolute URL: https://owa.mycompany.com/owa
Note: Make sure you are using "https"
Step 2:
1,Open IIS 7 Manager
2,Highlight the Default Website and ensure we are in the Features View
3, Double click on HTTP Redirect icon
4, Check the option "Redirect requests to this destination:" and type the absolute OWA URL: https://owa.mycompany.com/owa
5, Under Redirect Behavior section, select the option "Only redirect requests to content in this directory (not subdirectories)"
6, From the drop down, select the Status code: Found (302)
7, Click Apply to save the settings
8, Run IISRESET /noforce command in CMD for the settings to take effect.
Image may be NSFW.
Clik here to view.

Clik here to view.
