Solved

How do I perform a URL redirection from HTTP to HTTPS to another URL?

Posted on 2010-11-23
7
699 Views
Last Modified: 2012-05-10
Hi Experts,

I have two websites on one server using the same IP address and each references
a different URL.
 
Website1 - Default website has URL of mail.abc.com
Website2 - Jog website has URL of mail2.abc.com

Using appcmd + a combination of host headers and bindings, i've set these settings on my
websites:

%windir%\system32\inetsrv\appcmd set config "Default Web Site" /section:httpRedirect /enabled:true /destination:"https://mail.abc.com/owa" /childOnly:"true" -commit:apphost
%windir%\system32\inetsrv\appcmd set config "Default Web Site" /section:httpErrors /-"[statusCode='403',subStatusCode='-1']" -commit:apphost
%windir%\system32\inetsrv\appcmd set config "Default Web Site" /section:httpErrors /+"[statusCode='403',path='https://mail.abc.com/owa',ResponseMode='Redirect']" -commit:apphost
%windir%\system32\inetsrv\appcmd set site /site.name:"Jog" /+bindings.[protocol='http',bindingInformation='*:443:mail2.abc.com']
%windir%\system32\inetsrv\appcmd set site /site.name:"Jog" /+bindings.[protocol='http',bindingInformation='*:80:mail2.abc.com']
%windir%\system32\inetsrv\appcmd set config "Jog" /section:httpRedirect /enabled:true /destination:"https://mail2.abc.com/owa" /childOnly:"true" -commit:apphost
%windir%\system32\inetsrv\appcmd set config "Jog" /section:httpErrors /-"[statusCode='403',subStatusCode='-1']" -commit:apphost
%windir%\system32\inetsrv\appcmd set config "Jog" /section:httpErrors /+"[statusCode='403',path='https://mail2.abc.com/owa',ResponseMode='Redirect']" -commit:apphost

I am trying to set up these things:
1. URL redirection from HTTP to HTTPS
2. URL redirection from mail.abc.com to https://mail.abc.com/owa
3. URL redirection from mail2.abc.com to https://mail2.abc.com/owa

For Website1, when a user types mail.abc.com:
http://mail.abc.com -> redirects -> https://mail.abc.com/owa [THIS WORKS AS INTENDED]
http://mail.abc.com/owa -> redirects -> https://mail.abc.com/owa [THIS WORKS AS INTENDED]

For Website2, when a user types mail2.abc.com:
http://mail2.abc.com -> FAILS with a 500 error
http://mail2.abc.com/owa -> redirects -> https://mail2.abc.com/owa [THIS WORKS AS INTENDED]

Ideally http://mail2.abc.com should redirect to https://mail2.abc.com/owa but it's not working.

I've tried enabling SSL on both websites as well as disabling them. Both have the same result.
I've tried to setup IIS logs to capture 500 errors but no logs are generated. Any idea how to
solve this problem?
0
Comment
Question by:jacque1
  • 4
  • 3
7 Comments
 
LVL 25

Expert Comment

by:Tony Johncock
ID: 34198344
Did you follow this technet article:

http://technet.microsoft.com/en-us/library/aa998359(EXCHG.80).aspx

And do the IIS redirection bit too? I mean the bit about the custom error.

0
 

Author Comment

by:jacque1
ID: 34198444
Yes I've tried that...didn't work. I do not want the user to click on a custom page but to be redirected to the main owa page.
0
 
LVL 25

Expert Comment

by:Tony Johncock
ID: 34198459
No it should require them to click anything - what that technote does is change the error from "you need to connect to this page by SSL" (paraphrasing) into an automatic redirection to https://domain.com/owa
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:jacque1
ID: 34202206
I'm using W2K8 and followed the article:
"For a Configuration in Which SSL Is Required on the Default Web Site or on the OWA Virtual Directory in IIS 7.0 - To use IIS Manager to simplify the Outlook Web Access URL and redirect users to HTTPS"

I've set my 2 websites to Require SSL. and this is the appcmd entry that I had set to enable the redirection:

%windir%\system32\inetsrv\appcmd set config "Default Web Site" /section:httpRedirect /enabled:true /destination:"https://mail.abc.com/owa" /childOnly:"true" -commit:apphost

%windir%\system32\inetsrv\appcmd set config "Jog" /section:httpRedirect /enabled:true /destination:"https://mail2.abc.com/owa" /childOnly:"true" -commit:apphost

yet it doesn't work...

the exact error I get is
500 - Internal Server Error
There is a problem with the resource you are looking for, and it cannot be displayed.
0
 

Accepted Solution

by:
jacque1 earned 0 total points
ID: 34203397
Hi, I've solved this issue. it was a server problem and not configuration. thanks anyway.
0
 
LVL 25

Expert Comment

by:Tony Johncock
ID: 34203404
Care to share? That way if anyone else has a similar problem they have a resolution.
0
 

Author Closing Comment

by:jacque1
ID: 34224777
I resolved my own problem.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now