A. Before we describe how to create a virtual directory, it is first important to understand what a virtual directory is. For those who remember DOS, there was a command called join which allowed you to treat a different disk as a directory on the current drive. A Virtual directory is the same kind of thing, you can treat a directory or disk as a subdirectory of your web site.
For example your default web area may be c:\InetPub\wwwroot and this may be http://www.savilltech.com . If you had a subdirectory off of wwwroot called ntfaq, e.g. (c:\InetPub\wwwroot\ntfaq) you could access this as http://www.savilltech.com/ntfaq. What if I had run out of space on c: and wanted the FAQ to be on d:? You would create a virtual directory called ntfaq which would point to d:\pages\ntfaq and this procedure of creating a virtual directory is shown below.
- Start the Internet Service Manager (Start - Programs - Microsoft Internet Server)
- Double click on the Computer name of the web server which will display the properties
- Click the Directories tab
- Click the Add button which will display the Directory Propertices box.
- In the directory type the name of the disk and directory you want the new area to point to (or click Browse to select a directory).
- Next select the "Virtual Directory" check box and enter the alias you want the directory to be seen as, e.g. ntfaq
- Click OK
- Click OK again and then close the Internet Service Manager application
For IIS 4.0 and 5.0:
- Start the Internet Information Services manager
- Expand the computer
- Select ‘Default Web Site’
- Right click on the ‘Default Web Site’ and select New – Virtual Directory
- The virtual directory wizard will start. Click Next
- Enter the alias name for the directory, e.g. ntfaq if you wanted http://www.savilltech.com/ntfaq. Click Next
- Enter the path for the directory that the alias will point to, e.g. g:\data\ntfaq. Click Next
- Set the access permissions and click Next
- Click Finish to the wizard