Solved

How to redirect user - "http://Site1.com/Test" to "http://Site2.com/Test" - IIS

Posted on 2013-01-17
3
267 Views
Last Modified: 2013-01-17
Hi,

I am using Windows Server 2003. Can you please let me know how to redirect user if he has typed http://Site1.com/Test then he needs to redirect to http://Site2.com/Test ?

Note: Test - is just name. It is NOT a file name like (Test.asp).

Thanks
0
Comment
Question by:milani_lucie
3 Comments
 
LVL 7

Expert Comment

by:ded_ch
ID: 38789582
You can add a redirect rule to your webconfig file.
You will find it in the webroot of your site.

Add this to your rule section:

<rule name="Domain Name Check">
<match url="(.*$)" ignoreCase="true" />
<conditions>
<add input="{HTTP_REFERER}" negate="true" pattern="^$" />
<add input="{HTTP_REFERER}" negate="true" pattern="http://site.ext/.*" />
  </conditions>
<action type="Redirect" url="http://site.ext/{R:1}" redirectType="Permanent" />
</rule>

Open in new window


Simply change the URL values to your liking.
0
 
LVL 10

Accepted Solution

by:
bigbigpig earned 500 total points
ID: 38789588
Create a default document page (index.html, default.html, or whatever you want) and put it in the TEST directory.  In that HTML document put this in the <head> section:

<meta http-equiv="REFRESH" content="0;url=http://site2.com/test">
0
 

Author Comment

by:milani_lucie
ID: 38789642
bigbigpig:

This is the trick i am looking for more than 24 hours. You saved me. Thanks a lot !!!

Thanks
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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