3

I'm trying to setup a redirect from http://mail.example.com to https://mail.example.com/owa. I've been unsuccessful in doing this by using IIS's HTTP Redirect so I looked to other options. The one I settled on is to create a default document in the wwwroot folder to handle the redirect.

I created a file called index.aspx (and added index.aspx to the list of default documents) and put the following code in it:

<script runat="server">
 private void Page_Load(object sender, System.EventArgs e)
 {
  Response.Status = "301 Moved Permanently";
  Response.AddHeader("Location","https://mail.example.com/owa");
 }
</script>

Instead of getting a redirect I get:

403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.

I've been trying to find an answer to this but have been unsuccessful so far. One thing I did try was to add the Everyone group to wwwroot with read access. No change.

The AppPool for Default Web Site is DefaultAppPool and the Identity is ApplicationPoolIdentity. (I don't know what these things are but maybe knowing this will help you.)

BE77Y
  • 2,667
  • 3
  • 18
  • 23
Chris76786777
  • 979
  • 5
  • 21
  • 35
  • Have you tried the solutions provided at this URL? Specifically the URL Rewrite option? http://blogs.msdn.com/b/kaushal/archive/2013/05/23/http-to-https-redirects-on-iis-7-x-and-higher.aspx – user2320464 Jan 13 '16 at 19:24
  • I haven't but I've since moved to Exchange Online. And, honestly, I don't recall what my solution was or whether I ended up implementing a workaround of some kind. – Chris76786777 Jan 14 '16 at 02:02

4 Answers4

1

You could double check if Anonymous Authentication is enabled for the default web site, and the other authentication types (e.g. forms) are disabled?: http://technet.microsoft.com/en-us/library/cc770966(WS.10).aspx

Often the file system permissions can be correct, but IIS still won't allow users through if the authentication settings are wrong.

Kenny
  • 520
  • 1
  • 9
  • 24
0

I am not sure if you have seen this documentation Simplify the Outlook Web App URL. For the other method of creating a default document, you can check KB555053.

I would still prefer using HTTP Redirect module in IIS 7 instead of the default page as thats much better and easy.

Edit:

I created a simple owa folder under wwwroot directory and configured HTTP Redirect. This is how the web.config file looks like.

<configuration>
    <system.webServer>
        <httpRedirect enabled="true" destination="/owa" exactDestination="false" childOnly="true" />
    <system.webServer>
<configuration>
Vivek Kumbhar
  • 3,073
  • 1
  • 18
  • 13
  • I would prefer to use HTTP Redirect as well but that doesn't work. The instructions you gave are pretty much what I've tried to do without any success. – Chris76786777 Jun 03 '10 at 21:50
  • verify if you see similar entry in the web.config file of the web site you are configuring. should be Default Web Site by default. – Vivek Kumbhar Jun 04 '10 at 07:52
  • The problem is not the redirect. The problem is that the server is giving a 403 error. – Chris76786777 Jun 08 '10 at 17:09
0

you can also change your two lines of code to the following:

Response.Redirect("https://mail.mydomain.com/owa");

-3

Just change the 403 error to redirect to https://site/owa

Gabriel Graves
  • 181
  • 2
  • 9