Setting the Default Document Page

Discussion in 'Site Programming, Development and Design' started by Ray, Dec 16, 2010.

  1. Ray

    Ray

    This IIS 7 Module allows you to set your startup page for each application folder level. It will also allow you to precedence of which they will startup.
    To set the default startup document follow these steps.
    1.Connect to the web server using IIS 7 Manager.​
    2.Click on Default Documents.​
    3.Click on Add located on the right hand side.​
    4.Type the name of the file you want to startup.​

    If the file already exists and you want to give it the highest precedence follow these steps.

    1.Click on the file on the list in Default Documents.​
    2.Click on Move up or Move down to set its precedence.​

    Just like any IIS 7 Module you can either go through IIS 7 Manager to configure the settings or directly code it in the applications web.config file. Here is an example on how to set the Default Documents in the applications web.config file.

    Code:
    <configuration>
       <system.webServer>
          <defaultDocument enabled="true">
             <files>
                <add value="index.php" />
             </files>
          </defaultDocument>
       </system.webServer>
    </configuration>
     
  2. Gofer01

    Gofer01 Amateur Web Application Developer

    Your localhost I.I.S. testing server on Windows 7, or 10 will write default landing pages automatically in your web.config file. I also let my localhost web server write WinHost SmarterMail SMTP settings and WinHost Database ConnectionString to web.config file before publicising to the WinHost IIS web server. The SMTP port is 587

    [​IMG]
     

Share This Page