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

This question already has an answer here:

Can you set up a website to make a default redirect to a virtual directory?

I tried to do this but it overrode every single website in my setup to that redirect.

I want to be able to open http://mywebsite/ and have that redirect somewhere.

share|improve this question

marked as duplicate by Andrew B, Ward, Tom O'Connor May 18 '14 at 6:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

For IIS 6, set the content source to "Another directory".

IIS 7 introduces URL rewriting which lets you easily build a rule to do this redirect.

share|improve this answer
but when I did this it overrode every single virtual directory. I didn't select override all my virtual directories but it still did it. – Spence Jun 15 '09 at 2:02
Metabase keys are inherited by default, so if you set this key on your root, and none override it, it may get inherited. I would consider it a bug that this does not work the way you expected. If I'd have known you did this already I would have suggested one of the redirect options (JavaScript or ASP). – crb Jun 15 '09 at 12:28

Have you tried editing/creating the Default.html in your wwwroot folder?

The following Javascript will redirect to where you want:

<script type="text/javascript">
    window.location = "http://mywebsite/virtualfolder"
share|improve this answer

I would do the redirection from /default.asp. You can use something like:

' code to check the request here
' Redirect to directory of your choice
response.redirect "http://myserver/somedir/"

Though note that this won't be transparent to the user. They will see the URL they typed in change.


share|improve this answer

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