Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

IIS 7 Redirect Several Pages

Posted on 2011-02-21
1
Medium Priority
?
654 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
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

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…
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…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

810 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