0

Rule is

                <rule name="Redirect to new host" stopProcessing="true">
                    <match url=".*" />
                    <conditions>
                        <add input="{REQUEST_URI}" pattern=".*mycompany\.com/blogs(.*)" />
                    </conditions>
                    <action type="Redirect" url="http://blogs.mycompany.com{C:1}" />
                </rule>

The module's built-in pattern tester says that http://subdomain.mycompany.com/blogs/blog1 matches, so it should redirect to http://blogs.mycompany.com/blog1, but nothing happens. Would greatly appreciate help fixing this rule or writing one that does work!

Sapphireblue
  • 104
  • 2
  • 15

1 Answers1

0

It's work:

        <rule name="Test" stopProcessing="true">
            <match url=".*" />
            <conditions trackAllCaptures="true">
                <add input="{HTTP_HOST}" pattern="^.*mycompany\.com$" />
                <add input="{URL}" pattern="^/blogs(.*)$" />
            </conditions>
            <action type="Redirect" url="http://blogs.mycompany.com{C:1}" />
        </rule>
VMV
  • 576
  • 4
  • 6
  • I am totally willing to buy that, but changing the input to {URL}, the rule still doesn't fire. Even though the built-in pattern tester says it matches (again, like it did before... hmmm, getting the sense that the tester is kind of not worth a damn). – Sapphireblue Jan 14 '14 at 17:01