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

So I have a website running on a discount account, and I put an mvc app in a subdirectory. If my url is '' and my app is in directory 'sample', then '' will execute the mvc app.

My problem is that I want the app to be shown when you go to '' not just ''. I have access to the IIS Manager, and I'm sure there are many ways to do this.

What's the best way to do this?

share|improve this question
up vote 7 down vote accepted

You need to configure HTTP Redirection on the web site. Make sure that the HTTP Redirection role service of the Web Server role is installed. Once that's done you can select your site in IIS Manager and double click the HTTP Redirect icon in the IIS area of the features view to configure redirection. (Sounds complicated, huh) - ;)

share|improve this answer

Just set

  <clear />
  <add value="Candidate/Login.aspx" />

in Web.config file and put all files not with in a subfolder so that user can type Url only instead of Url/subfolder....

Here clear is the main thing to be done which will clear all other default docs with in IIS ...

share|improve this answer

Unless you have other subdirectories that need to be relative to the webroot, you should be able to simply point the root of the website (either a defined website for that host header, or the default site) to the sample directory.

share|improve this answer

If I am not mistaking, you can just change the path for the website (not the virtual directory), so that the website points directly to the root folder.

In general, lets assume your website follows the following heirarchy:


So, if you point the website to D:\Root, then you will have a folder named Sample listed as a folder under your website. If you make it to point d:\Root\Sample, then it should be displaying the inner files/folders of your sample folder.

I am unsure if you want to change the settings for your default website. If this is the only website you are going to host, then you might as well make it. Your IIS default folder will no longer be c:\inetpub\wwwroot - which usually has most of the configurations done beforehand to let any webpage placed here such as handling the access permissions.

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.