Solved

Redirect on same server

Posted on 2009-05-05
4
433 Views
Last Modified: 2012-05-06
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.
0
Comment
Question by:Bob Schneider
[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
4 Comments
 
LVL 5

Assisted Solution

by:Ubertam
Ubertam earned 350 total points
ID: 24309810
I've recently done something very similar to this, but it's much easier than that.

Create a new site.  Describe it site1.com or something similar.
Go to the properties of your new site.
Specify the IP address (don't just use "all available" and click Advanced.
Add host header values for however you want to be accessed (this may be more than req'd, but it works):
site1
site1.com
www.site1.com
Click OK.
Go to the Home Directory Tab
Choose "A redirection to a URL"
Type your exact URL in the "redirect to:" box: http://www.site2.com/default.aspx
Choose "The exact URL entered above" and "A permanent redirection for this resource"

Hit apply and make your local DNS changes to point site1, site1.com, and www.site1.com to your IIS server.

Enjoy.
0
 
LVL 5

Accepted Solution

by:
Ubertam earned 350 total points
ID: 24309825
By the way, the reason I needed to do this is I have SBS 2003 and wanted to utilize SharePoint Services 3.0.  Our url was going to be http://myserver:3080 (not very end user friendly).  I wanted to name the site Bobber!, accessible at bobber, bobber.com, and www.bobber.com.  I followed the steps above and directed that site to http://myserver:3080/default.aspx and viola!

I also changed the existing site: companyweb to the new URL and it changed over everyone's home page who were using the old SP2.0 site as their home page without them having to do anything.
0
 
LVL 1

Assisted Solution

by:internethotspot
internethotspot earned 150 total points
ID: 24309874
Simple way is to use a stealth redirection service such as offered by MyDomain.  When a query or anything is entered, have it contain the entire website address, which would be redirected via DNS server.  For example, going to website www.mywhataniceday.com could stealth redirect to www.myyouareugly.com without anyone knowing.  The address would still show the requested address (stealth).  However the user would actually be on the second site.
0
 

Author Comment

by:Bob Schneider
ID: 24310421
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?
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

739 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