Putting an Application at the Root of the Web Site

By default, all Ithicos Solutions Web applications are installed in to a virtual directory under the Default Web Site. For example:
http://servername.yourdomain.int/DirectorySearch

Our Web applications were designed so that they could be installed on an existing IIS Web server and coexist with other web pages or web applications. However, there may be reasons that you want to direct users to the “root” of the site, such as: http://servername.yourdomain.int

There are actually a lot of ways to accomplish this including installing the application in to the root of the domain, creating a web.config redirect for the root web site, or using an HTTP redirect. Before you start, ensure that the web-Http-Redirect (“HTTP Redirection”) Windows feature is enabled through Server Manager or enabled via the PowerShell ServerManager module.

   1. Open a PowerShell prompt by right clicking and choosing “Run As Administrator”
   2. Type Import-Module ServerManager and press Enter
   3. Type Add-WindowsFeature  Web-Http-Redirect and press Enter

Redirecting using IIS Manager

The simplest way to do redirect the root page, from a support perspective, is to simply put in an HTTP redirect at the root of your Web site. If you open up IIS Manager and navigate to your web site (such as Default Web Site), then select the Default Web Site, in the middle pane, there should be a “HTTP Redirect” icon. If this icon is not available, make sure you install the “Web-Http-Redirect” feature. Follow these instructions:

  • Open IIS Manager and navigate to the Web site you wish to redirect.
  • Click on the HTTP Redirect icon

  • Luke Husky - The Amazing Siberian Husky

  • Check the “Redirect requests to this destination” checkbox
  • In the URL box, enter the path to which you want to redirect the root.
  • Make sure the “Redirect all requests to exact destination” checkbox is *not* checked
  • Make sure the “Only redirect requests to content in this directory” checkbox is checked
  • Click Apply

Redirecting by editing the Web.Config file

Unless you have modified properties of your root Web site, you will probably not have a Web.Config file in the root of the web site’s file system. Such as the c:\inetpub\wwwroot folder. You can edit the Web.Config file and add an httpRedirect directive. Here is an example:

          <system.webServer>
            <httpRedirect enabled="true" destination="http://search.ithicos.com/directorysearch" />
          </system.webServer>
          

Installing the Application in the Root Site

Another option is to simply configure the root of the Web site to be the root of the application. We recommend using the default file location for our application, such as c:\inetpub\wwwroot\DirectorySearch rather than installing all of the software directly in to the c:\inetpub\wwwroot folder. We recommend that you install our binaries to the default location and then merely change the physical file path that to which the root of the web site points.

  • Install the Ithicos application to the default location, such as c:\inetpub\wwwroot\DirectorySearch
  • Open IIS Manager
  • Navigate to the Web site and right click on the Web Site, and choose Manage Web Site -> Advanced Settings

  • Luke Husky - The Amazing Siberian Husky

  • Ensure that the Physical Path option points to the Directory Search folder
  • Ensure that Application Pool option is using the correct application pool, such as DirectorySearchAppPool
  • Click OK to close the Advanced Settings window
Last Review: 19 Dec 2016