Solved

IIS 7 Redirect Several Pages

Posted on 2011-02-21
1
648 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

Technology Partners: 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

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…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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