IIS: Changing a Virtual Directory to a folder

Brown, Matt 126 Reputation points
2024-07-31T15:19:32.18+00:00

A website was incorrectly defined in IIS with a virtual directory, and it needs to be a folder. The directory in question is a subfolder off the default site. What are the steps to get it to be a folder instead?

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Marcin Policht 49,790 Reputation points MVP Volunteer Moderator
    2024-07-31T15:22:47.6133333+00:00
    1. Open IIS Manager:
      • Press Windows + R, type inetmgr, and press Enter.
      • Alternatively, search for "IIS Manager" in the Start menu.
    2. Locate the Virtual Directory:
      • In the left-hand Connections pane, expand the node for your server.
      • Expand the Sites node and select the Default Web Site (or the relevant site).
    3. Remove the Virtual Directory:
      • Under the Default Web Site (or your selected site), find the virtual directory you need to change.
      • Right-click on the virtual directory and select Remove.
      • Confirm the removal by clicking Yes.
    4. Create/Verify Physical Folder:
      • Navigate to the physical directory path of your default website. This is typically located at C:\inetpub\wwwroot by default.
      • Ensure the subfolder you need exists. If it does not, create the subfolder.
    5. Restart IIS (optional but recommended):
      • In IIS Manager, click on the server node.
      • In the right-hand Actions pane, click on Restart.

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.