Solved

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

Posted on 2010-11-23
7
706 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 26

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 26

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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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 26

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
This video discusses moving either the default database or any database to a new volume.

751 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