Solved

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

Posted on 2013-01-17
3
259 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
Comment Utility
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
Comment Utility
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
Comment Utility
bigbigpig:

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

Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now