iis 6.0 script 301 redirect

How can you script a 301 redirect in IIS 6.0?


@REM Redirect site #1 in IIS 6.0 to brakertech.com
cscript.exe c:\inetpub\adminscripts\adsutil.vbs set w3svc/1/Root/HttpRedirect "http://brakertech.com, EXACT_DESTINATION,PERMANENT"

@REM List redirect properties for site #1 in IIS 6.0
cscript.exe c:\inetpub\adminscripts\adsutil.vbs get w3svc/1/Root/HttpRedirect

@REM Delete redirect properties for site #1 in IIS 6.0
cscript.exe c:\inetpub\adminscripts\adsutil.vbs delete w3svc/1/Root/HttpRedirect

 

Here are some related links:

http://msdn.microsoft.com/en-us/library/ie/ms525728%28v=vs.90%29.aspx

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.