Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-23
7
Medium Priority
?
724 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 26

Expert Comment

by:Tony J
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 J
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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

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 J
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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Steps to fix “Unable to mount database. (hr=0x80004005, ec=1108)”.
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…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Suggested Courses

972 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