Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.)

share|improve this question
    
Have you tried the solutions provided at this URL? Specifically the URL Rewrite option? blogs.msdn.com/b/kaushal/archive/2013/05/23/… – user2320464 Jan 13 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. – idon'twearsuits Jan 14 at 2:02

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>
share|improve this answer
    
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. – idon'twearsuits Jun 3 '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 4 '10 at 7:52
    
The problem is not the redirect. The problem is that the server is giving a 403 error. – idon'twearsuits Jun 8 '10 at 17:09

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

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

share|improve this answer
    
The problem is not the redirect. The problem is that the server is giving a 403 error. – idon'twearsuits Jun 8 '10 at 17:08

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.