I\'m running IIS 7 with the offical rewrite rule module installed. I\'d like to create a rewrite rule to match this URL:
         
        Found the solution by myself, just share it.
<rewrite>
    <rules>
        <rule name="Redirect for download result page" stopProcessing="true">
            <match url="(.*)/test.aspx(.*)" />
            <action type="Redirect" url="{R:1}/test.aspx?rf=sp" appendQueryString="true" redirectType="Found" />
            <conditions>
                <add input="{QUERY_STRING}" pattern="flag=value" negate="true" />
            </conditions>
        </rule>
    </rules>
</rewrite>