Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-01-17
3
Medium Priority
?
295 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

824 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