# Adding Virtual Directories

By default, IIS installs a directory in which you can place any files you want to have published on your Web site. If your site becomes too complex, or you decide to use scripts and applications in your pages, you may want to create additional directories for your published content.

To add a new virtual directory

1. Open Personal Web Manager and click the Advanced icon on the sidebar.
2. In the Advanced Options panel, click the Add button.
3. In the Add Directory dialog box, type the path to the directory and an alias directory name.
4. Set the directory access permissions by checking Read, Write, or Script Source Access.

- Read Enables Web clients to read or download files stored in a home directory or a virtual directory. If a client sends a request for a file that is in a directory without Read permission, the Web server returns an error message. Generally, you should give directories containing information to publish (HTML files, for example) Read permission. You should disable Read permission for directories containing Common Gateway Interface (CGI) applications and Internet Server Application Program Interface (ISAPI) dynamic link libraries (DLLs) to prevent clients from downloading the application files. By default, all directories created during setup have Read permission.
- Write Enables Web clients to change file content and properties.
- Script Source Access Enables read, write, and directory browsing permissions. This option is available only if either Read or Write is also checked.

5. Set the application permissions by checking None, Scripts, or Execute (including scripts).

- None Prevents any script or application from being run in this directory.
- Scripts Enables a script engine to run in this directory without having Execute permission set. Use Script permission for directories that contain ASP scripts, Internet Database Connector (IDC) scripts, or other scripts. Script permission is safer than Execute permission because you can limit the applications that can be run in the directory. If a client sends a request to run a script in a folder that does not have Scripts permission, the Web server returns an error. By default, all directories created during setup have Scripts permission.
- Execute Enables any application to run in this directory, including script engines and Windows 2000 binaries (.dll and .exe files). For security purposes, do not give content folders Execute permission.

—Or—

1. In My Computer, click the folder you want to share.
2. On the File menu, click Properties.
3. On the Web Sharing property sheet, select Share this folder.
4. Click Add and type the name of the alias you want for this directory in the Alias box. By default, the computer assigns the directory name as the alias if you do not change the information.

Important When you click OK in the Edit Alias dialog box, your changes take effect immediately. Clicking Cancel on the Web Sharing property sheet does not cancel the alias assignment.

To delete a virtual directory from your Web site

1. In the Advanced window, select the virtual directory you want to stop publishing from.
2. Click the Remove button.

Note Removing a virtual directory does not delete either the files or the directory from your hard disk. Only the mapping between the alias and the directory is removed, thereby making your files unavailable to the Web server.

Related Topics

- For an explanation of what a virtual directory is, see Virtual Directories in About Publishing Directories.
- For information about scripts, see Active Server Pages.

© 1997-1999 Microsoft Corporation. All rights reserved.