Wednesday, May 28, 2008

How to change default documents on IIS7 (Vista, Server 2008)

Using the appcmd command you can view, add and delete default documents in IIS configuration.

View:
C:\> %SystemRoot%\system32\inetsrv\appcmd list config /section:system.webServer/defaultDocument

Add:
C:\> %SystemRoot%\system32\inetsrv\appcmd set config /section:system.webServer/defaultDocument /+files.[value='index.php']

Remove:
C:\> %SystemRoot%\system32\inetsrv\appcmd set config /section:system.webServer/defaultDocument /-files.[value='index.php']

No comments: