Solved

IIS 7 Redirect Several Pages

Posted on 2011-02-21
1
642 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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now