views:

227

answers:

1

I have written a simple redirect rule for IIS7, I would like to apply this same rule across the entire server so I added it to the applicationHost.config via the IIS interface. I have confirmed it has created the rule correctly in the file, however it simply does not work, I get no error so it is hard to know what I am doing wrong?

    <rewrite>
        <globalRules>
            <rule name="default" enabled="true" stopProcessing="true">
                <match url="(.*)default.aspx|(.*)index.aspx|(.*)index.html" />
                <action type="Redirect" url="{R:1}" redirectType="Permanent" />
            </rule>
        </globalRules>
    </rewrite>

Any help would be appreciated.

A: 

I posted the same issue in the IIS forum and I got the answer... so i thought i'd share it.

I can't say I understand it, but can confirm it does solve my issue.

The expression should be: (.*)(?:index|default).(?:aspx|html)$

http://forums.iis.net/p/1164478/1932290.aspx#1932290

bigtv