Purpose
The purpose of this project is to demonstrate how to redirect visitors going to a website to another website by rewriting the URL and preserving http/https and query string data.

How I Approach This Project
This code is based on your ability to replace code of an existing webpage so that it will redirect users (by rewriting the URL) to another website. The advantage of this approach is you can easily redirect users visiting a webpage to the same location on another website, and you just need a redirect setup on a few webpages. This disadvantage of this method is that every webpage in a website (you are redirecting from) would have to be setup either by copying and pasting the code into each ASP file, or by using ASP's "include" method (similar to PHP).

If you are looking for a redirect and URL rewrite for an entire website, you'll need to write your own ISAPI module for IIS 6/7 or locate one from the Internet. Otherwise, check out the code provided below; the only thing that you have to change is "www.another-website-domain-name.com" to point to the website domain name you wish to redirect users to.