Learn how to a build a cloud-first strategyRegister Now


How to redirect a legacy website to another website that uses host headers

Posted on 2011-04-26
Medium Priority
Last Modified: 2012-05-11
I have a legacy website (virtual directory) that no longer exists (http://website1.company.com/website1) that needs to redirect users to a different website that uses host headers.

I cant use a simple DNS CNAME because the legacy site is a virtual directory and when I try to do a redirect  from within IIS to the new site it doesnt work. The new site is hosted on an iis server with other sites that all use host headers.

How can I get this to work?  How do I get the new website to respond from traffic redirecting from the old website?  Are there additonal steps Im missing when redirecting?
Question by:chris3174

Expert Comment

ID: 35473075
if you point the virtual directory to the new site it should work, is it hosted on the same server?

Do you have application pools or other specific settings set up that might not respond well to these settings?

Author Comment

ID: 35473091
The other site is not hosted on the same server.  It does have a seperate app pool.
LVL 11

Expert Comment

ID: 35473119
If you can't get rid of or change the virtual directory then just create a dummy page just underneath it that will do the redirect to the new site for you when people land there.
     <meta http-equiv="Refresh" content="0; url=http://www.anothersite.com/">

Open in new window

Make sure the name you give the file is one of the default documents that IIS will use.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 35473139
yup, if it's not the same server you need to use brutaldev's solution :) call the dummy page index.html or somesuch.

If that doesn't work with your host headers I have another type of redirect you can use.

Accepted Solution

vaibhavjaiman earned 1000 total points
ID: 35474158

Or you can also do this using Redirection with Javascript

<script type="text/javascript">
LVL 11

Assisted Solution

brutaldev earned 1000 total points
ID: 35474575
The meta redirect is a better option than using javascript because not everyone's browser may have script enabled so they'll end up on a blank page.

If you want to do a 301 SEO friendly redirect then you can configure IIS quite easily to do this as well. The instructions can be found here: http://www.windowshostingasp.net/windows_hosting_forums/showthread.php?t=35.

So many options...

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 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