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

I want the default document in a folder to redirect to another URL but I still want other files in the same directory to be served normally. How can I do this in IIS 7? For example:

my-site.com/              => redirects to http://example.com
my-site.com/default.aspx  => redirects to http://example.com
my-site.com/foo.aspx      => served normally
share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you create default.aspx and redirect it to another page, the other pages should still work.

In IIS Manager, right click the default.aspx page, select properties, select the radio button for A redirection to a URL. Enter the redirection URL and click OK.

In IIS 7, drill down to the page in Content view, then when you click the page select Switch to Features View and select HTTP redirect.

share|improve this answer
    
Are these instructions for IIS 7? I don't see Properties when I go into Content View and right click the file. –  Jeff Apr 16 '12 at 21:09
    
edited my answer –  uSlackr Apr 16 '12 at 21:21
    
Oh, ok. That makes sense. I tried that and IIS is redirecting for /default.aspx but not /. Is it supposed to redirect for both? –  Jeff Apr 16 '12 at 21:25
    
if you redirect / I believe it will not allow you to get inside the directory. The default file should be sufficient. –  uSlackr Apr 16 '12 at 21:27

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.