views:

113

answers:

2

Hello All, Please someone explain to me by example what is a virtual directory and why do we need it?

+2  A: 

A virtual directory is a friendly name, or alias, either for a physical directory on your server hard drive that does not reside in the home directory.
Because an alias is usually shorter than the path of the physical directory, it is more convenient for users to type.

Taken from here

Binoj Antony
The primary benefit was abstraction enabling reuse and complex hosting structures, I think the convenience aspect was tertiary or less :)
annakata
+3  A: 

In essence, in IIS, it's like a shortcut to another directory on your computer while seeming like it is a subdirectory of the current directory.

I.E.

www.example.com/bob/phil

bob may be a subdirectory of the root, while phil is a directory elsewhere on the computer, not necessarily in bob

MasterMax1313