For users attempting to login to an on site exchange hybrid system and their
accounts exist in the 365 cloud, the normal action is exchange to prompt them
with a page with a new link, not to redirect them. Using the following you can
automatically redirect the OWA / Exchange users to the 365 cloud.
Exchange Instructions
Check your links to the cloud are correct and update them to https (Exchange Shell):
get-OrganizationRelationship
Update
set-OrganizationRelationship “On Premises to Exchange Online Organization Relationship” -TargetOwaURL:https://outlook.com/owa/<365domain>
<On all CAS Servers>
edit: C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\owa\casredirect.aspx
Right after the imports paste:
<%
if (RedirectionUrl.Contains("http://outlook.com/owa")) {
Response.Redirect(RedirectionUrl);
Response.End();
}
if (RedirectionUrl.Contains("https://outlook.com/owa")) {
Response.Redirect(RedirectionUrl);
Response.End();
}
%>