Link to home
Start Free TrialLog in
Avatar of Bob Schneider
Bob SchneiderFlag for United States of America

asked on

Redirect on same server

I want to redirect all requests for one web site to another web site on my server.  I am running IIS 6.0 on Windows Server 2003.  Right now I have just posted a default.asp page in the root directory for the incoming requests that redirects to a "www" page elsewhere on the same server.  Will that work?  Do I have to do anything to the host file?

Example: say a request comes in for www.domain1.com but I want that request to be redirected to www.domain2.com on the same server.  Will what I said above do that if I just put (in the default.asp page in the domain1.com root directory)
[code]
Response.Redirect "www.domain2.com"
[/code]

I can't try it myself because this is the result of a change that I am waiting for dns servers to propagate.
SOLUTION
Avatar of Ubertam
Ubertam
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bob Schneider

ASKER

Thanks so much for the help but the first solution doesn't work because I need to pass a query string and it won't take that.  RE: the stealth approach, I don't care if anyone knows about the site that it is redirected to or not but I do need to pass the query string.  So I guess my initial example should have been
"www.domain2.com/folder/a_page.asp?some_var=1

More help?