Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename virtual directory on Windows Server 2008 (IIS7 )

How can I rename a virtual directory (i.e., change the Virtual Path name) in IIS7 on Windows Server 2008?

In Server Manager I click on the application, select Basic Settings, but the box showing the current Alias is greyed out and I can't edit it.

like image 374
njr101 Avatar asked Apr 28 '09 11:04

njr101


People also ask

How do I find virtual directory in IIS?

Hold down the Windows key, press the letter X, and then click Control Panel. Click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.


2 Answers

I found a way to do this using the built in appcmd.exe tool. If you wanted to change your virtual directory "Images" inside your application "OldApplicationName" type this into the command line.

%systemroot%\system32\inetsrv\appcmd set vdir "Default Web Site/OldApplicationName/Images" -path:/Images2 

More details, including how to rename applications here: http://www.foliotek.com/devblog/rename-applications-and-virtual-directories-in-iis7/

like image 104
Brian Grinstead Avatar answered Sep 30 '22 08:09

Brian Grinstead


For as far as I know, there is no way to do it. You can only delete the virtual directory, and recreate it with the same settings.

Or at least, you can't do it through the GUI. There might be ways to do it through scripting in PowerShell for example. But I don't know how.

like image 43
pyrocumulus Avatar answered Sep 30 '22 09:09

pyrocumulus