Renaming Virtual Directories
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
In IIS 6.0, you cannot use IIS Manager to rename a virtual directory. Instead, you can rename a virtual directory by editing the MetaBase.xml file using a text editor, such as Microsoft Notepad.
Note
Always back up the metabase before editing MetaBase.xml. For information about backing up the metabase, see Backing Up and Restoring the Metabase in IIS 6.0.
Important
You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer\Administrator cmd to open a command window with administrator rights and then type cscript.exe ScriptName (include the script's full path and any parameters).
Procedures
To rename a virtual directory by using Notepad
Open MetaBase.xml in Notepad. The default location for MetaBase.xml is C:\Windows\System32\Inetsrv.
On the Edit menu, click Find, and then locate the virtual directory name that you want to change.
Replace the current virtual directory name with a new name.
Close the MetaBase.xml file and when prompted, save the changes.
In IIS Manager, right-click the local computer, and then select All Tasks.
On the All Tasks menu, click Save Configuration to Disk
Note
When you rename a newly created virtual directory, it takes at least two minutes for the change to appear in IIS Manager if no other changes are pending. To see the change immediately in IIS Manager, close and then reopen IIS Manager.