Redirecting
traffic from one website to another website can be easily done by adding a
simple rule in URL Rewrite module of IIS. Let’s see how we can do this.
We will
create a rewrite rule by following below steps:
1. Open IIS Manager by typing inetmgr
in Start->Run.
2. Select the Web Site for which
you want to create a rule.
3. Click on URL Rewrite.
4. Click on the Add Rule(s) link
in Actions pane on the right-hand side.
5.
Select
Blank Rule from the Add Rule(s) dialog box and click OK.
6. Here you will define the actual
rule. Enter values in following text boxes and then click on the Conditions
tab.
- Name : for example “Redirect to New Url”
- Patterns : “.*”
7. Click on the Add button to
add conditions and enter values in the below text boxes. Click on OK
button.
- Condition Input : “{HTTP_HOST}”
- Pattern : “^hostname.com.*’
8. Now click on the Action tab and do following
changes. Click on the Apply link in the right page.
·
Action
type : select ‘Redirect’ from the dropdown
·
Redirect
URL : Type your target url ‘http;//xyzhost.com’
Your rule is created
now and you can test it by browsing the source url. Once you browse your source
url http://hostname.com you will be
redirected to http://xyzhost.com.





No comments:
Post a Comment