Solved

IIS 7 Redirect Several Pages

Posted on 2011-02-21
1
647 Views
Last Modified: 2012-08-13
Currently for IIS6, we have several redirection sites configured and need to move them to an IIS7 server.
For example: User types http://website1/ (NOT fqdn) into IE and is redirected to http://website2.domain.com/page.aspx

In IIS7, using the URL Rewrite module, is there a way to use the rewrite maps to configure a single rule with multiple mappings?

I have tried, but cannot get the rule working correctly.
0
Comment
Question by:CanalIns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
CanalIns earned 0 total points
ID: 34945504
This seems to be working, but I don't know if it's best practices.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Redirect Rule" stopProcessing="true">
                 <match url=".*" />
                    <conditions>
                          <add input="{StaticRedirects:{HTTP_HOST}}" pattern="(.+)" />
                      </conditions>
                   <action type="Redirect" url="{C:1}" appendQueryString="False" redirectType="Permanent" />
                </rule>
            </rules>
            <rewriteMaps>
                <rewriteMap name="StaticRedirects">
                    <add key="ipmonitor2" value="https://xxxx.xxxxx.com/" />
                    <add key="cirs2" value="http://xxxxx/Reports/Pages/Folder.aspx" />
                </rewriteMap>
            </rewriteMaps>
        </rewrite>
    </system.webServer>

</configuration>
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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