Using Virtual Directories (Windows)

A virtual directory is a link to an existing physical directory that is present on the server’s hard disk. Virtual directories can have a number of specific settings like custom ASP.NET configuration, access permissions, and protection with a password.

Because any virtual directory can have its own settings, including customized ASP.NET configuration, virtual directories are very useful in setting up your web applications, especially those written in ASP.NET. For example, if you have three web applications that use ASP.NET version 2.0, and you need to install one web application that uses ASP.NET version 4.0, you can create a virtual directory for the ASP.NET 4.0 application, configure ASP.NET settings for this directory so as to enable support for version 4.0, and then successfully install the required application.

Virtual directories can also be used as aliases. For example, you have a web application installed on your domain “example.com” in the physical directory “/my_data/web_apps/forum". To access this web application, users need to type “example.com/my_data/web_apps/forum", which is hard to remember and too long to type. You can create virtual directory called forum in the root of your virtual host, and link this virtual directory to “/my_data/web_apps/forum", so the users who want to access the web application will need to type “example.com/forum", which is much shorter and easier to remember.