IIS 7 default document

Posted on 2009-12-16
Last Modified: 2012-05-08
Dear Experts,

How to set different default document for different domain that point to the same folder?
for example.

default document: index.aspx
point to folder: c:\websites\example\

default document: index.aspx?id=test1
point to folder: c:\websites\example\

default document: index.aspx?id=test2
point to folder: c:\websites\example\

Please advise how to make above case works, as the iis7 setting use the shared web.config for default document.

Thank you.
Question by:hotex
    LVL 9

    Expert Comment


    You have to click on website name in IIS7 -> Double Click on Default Document -> Click on index/default page which you want to set -> Set it on top using Move UP button in the right

    You have to these steps for all the websites.
    LVL 3

    Expert Comment

    best way of browsing with other defaults is

    follow the url:

    you can all three links from above urls.

    thats all
    LVL 13

    Accepted Solution

    This can be done by putting the default document into the applicationhost.config, instead of the web.config.

    To do this, remove the entries in the web.config.

    Then run the following command for each of your websites below.

    Replace    test-1 website     with the friendly name of your website in IIS.

    Check here for reference:

    %windir%\system32\inetsrv\appcmd.exe set config "test-1 website" -section:system.webServer/defaultDocument -+files.[value='Connectindex.aspx?id=test1'] -commitpath:apphost

    Open in new window


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    We recently had an issue where out of nowhere, end users started indicating that their logins to our terminal server were just showing a "blank screen." After checking the usual suspects -- profiles, shell=explorer.exe in the registry, userinit.exe,…
    Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
    This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
    To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now