Managing Web Content


As discussed in Chapter 3, “Configuring Web Sites and Servers,” every Web site on a server has a home directory. The home directory is the base directory for all documents that the site publishes. Copying files into the home directory, a virtual directory, or any subdirectory of these directories is, in fact, how you publish documents on a Web site.

Documents inherit the default properties of the site and the default permissions of the Windows folder in which they’re placed. You can change these properties and permissions for each individual document or for all documents within a directory.

Caution

Browsers can cache file and directory paths in bookmarks. To prevent errors when renaming or deleting files, you might want to redirect browser requests to the new location using the technique discussed in the “Redirecting Browser Requests” section of this chapter.

Opening and Browsing Files

You can open files in a browser from within the IIS snap-in. To do this, right- click the file and then select Open from the shortcut menu. This opens the file using a directory path, such as D:\Inetpub\Wwwroot\Default.htm.

You can display most types of files in the default browser by opening them. However, if the file is an .asp document or other type of dynamic content and the Web site is running, the file won’t be displayed. You must be browsing the file to view it in Microsoft Internet Explorer. To browse a file, right-click the file and then select Browse from the shortcut menu.

Modifying the IIS Properties of Files

You can modify the settings for a Web file at any time. You set file permissions and general file properties in Windows Explorer. You set IIS permissions and properties in the file’s Properties dialog box. In the IIS snap-in, right-click the file, and then select Properties.

Renaming Files

You can rename Web files in the IIS snap-in. To do that, follow these steps:

  1. Start the IIS snap-in and then click the plus sign (+) next to the Web site you want to work with.

  2. Navigate within the site, click the file you want to rename, pause for a moment, and then click the file name. The file name is selected for editing.

  3. Edit the name of the file and then press Enter.

    Note

    Using the “click, pause, click” technique for renaming a file can take a bit of practice. Remember to click on the file’s name and not its icon. If you find it just isn’t working, right-click the file you want to rename and then select Rename.

Deleting Files

You can delete physical and virtual directories in the IIS snap-in. When you delete a physical directory, the directory and its contents are removed and placed in the Recycle Bin. When you delete a virtual directory, only the alias to the directory is removed. The actual contents of the related physical directory aren’t deleted.

To delete a physical or virtual directory in the IIS snap-in, follow these steps:

  1. In the IIS snap-in, click the plus sign (+) next to the Web site you want to work with.

  2. Right-click the directory you want to delete and then select Delete from the shortcut menu. When asked to confirm the action, click OK.




Microsoft IIS 6.0Administrator's Consultant
Microsoft IIS 6.0Administrator's Consultant
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 116

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net