Solved

Script creating a virtual direcotry redirect in iis6?

Posted on 2014-02-10
2
441 Views
Last Modified: 2014-03-12
Hello all

I have a large number of virtual directory redirects to put in place on an IIS 6.0 web server. I'd like to script this to save myself some time clicking a billion times in the interface.

I read an article about creating the virt directory with cscript but don't see how I can create a redirect using this syntax.

I imagine it's something simple I'm missing. Could anybody help?

I'm making redirects like www.mysite.com/AL that should be a virtual directory and redirect to www1.mysite.com/stuff/alaska.htm

Thanks!
0
Comment
Question by:scox72
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 39848087
Something like below should work.

cscript.exe adsutil.vbs set w3svc/2/Root/AL/HttpRedirect "www1.mysite.com/stuff/alaska.htm, EXACT_DESTINATION"
0
 

Author Comment

by:scox72
ID: 39923703
Sorry for abandoning this question -- I went on vacation and totally forgot about it.

Here's the essence of what I used, helped by becraig's suggestion above. This sets the virtual directory and the redirect.

iisvdir /creat w3svc/1/root/ diralias c:\inetpub\wwwroot\redirect
adsutil.vbs set w3svc/1/root/diralias/httpredirect "http://www.mysite.com/stuff/alias.htm, EXACT_DESTINATION"

not iisvdir and adsutil.vbs are in different directories on the server c:\windows\system32\ and c:\inetpub\adminscripts respectively.

Thanks agian becraig!
0

Featured Post

Containers and Docker for Everyone

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
The viewer will learn how to count occurrences of each item in an array.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question