Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a virtual directory in IIS 7 called Foo. There is a URL that you can access at mydomain.com/Foo/test.aspx

I would like mydomain.com to automatically go to mydomain.com/Foo/test.aspx but can't seem to find a way to do this in IIS 7 with redirects (it keeps redirecting to mydomain.com/Foo/test.aspx/Foo/test.aspx/Foo/test.aspx/.... if I redirect to Foo/test.aspx or the full address mydomain.com/Foo/test.aspx.

How is this done?

share|improve this question

1 Answer 1

One option is to have a default document with the following content in the site root:

<%@ page language="c#" %>

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
share|improve this answer

Your Answer


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.