Virtual Directory in IIS

https://www.iis.net/configreference/system.applicationhost/sites/site/application/virtualdirectory

Overview

The <virtualDirectory> element is a child of the <application> element and controls the configuration settings for a specific virtual directory.

A virtual directory is a directory name (also referred to as path) that you specify in Internet Information Services (IIS) 7 and map to a physical directory on a local or remote server.

The virtual directory name becomes part of the application's URL, and users can request the URL from a browser to access content in the physical directory, such as a Web page or a list of additional directories and files.

If you specify a different name than the physical directory for the virtual directory, it is more difficult for users to discover the actual physical file structure on your server because the URL does not map directly to the root of the site.

In IIS 7, each application must have a virtual directory, known as the root virtual directory, and maps the application to the physical directory that contains the application's content.

However, an application can have more than one virtual directory.

For example, you might use a virtual directory when you want your application to include images from another location in the file system, but you do not want to move the image files into the physical directory that is mapped to the application's root virtual directory.

HOW TO CREATE A NEW VIRTUAL DIRECTORY

    • In the Connections pane, expand the server name, expand Sites, expand the Web site to which you want to add the virtual directory, and then click the application to which you want to add the virtual directory.
      Virtual Directory in IIS
    • In the Actions pane, click View Virtual Directories, and then click Add Virtual Directory...
    • In the Add Virtual Directory dialog box, at a minimum enter information in the Alias: and Physical path: text boxes, and then click OK.
    上一篇:Understanding IIS Bindings, Websites, Virtual Directories, and lastly Application Pools


    下一篇:树莓派的.bashrc和.bash_aliases文件