IIS Web.Config 301重定向查询字符串参数(?)

Eti*_*uis 4 asp.net iis web-config

    <rule name="blog" stopProcessing="true">
      <match url="en/blog.aspx?Id=9" />
      <action type="Redirect" url="http://www.mynewurl.com" redirectType="Permanent" />
    </rule>
Run Code Online (Sandbox Code Playgroud)

我可以重定向"en/blog.aspx",但我无法仅重定向"en/blog.aspx?Id = 9".

有任何想法吗?

Eti*_*uis 9

终于找到了解决方案:

/en/blog.aspx?Id=9将重定向到http://www.newurl.com.

    <rule name="blog" stopProcessing="true">
      <match url="en/blog.aspx$" />
      <conditions>  
        <add input="{QUERY_STRING}" pattern="Id=9" />  
    </conditions>  
      <action type="Redirect" url="http://www.newurl.com" redirectType="Permanent" />
    </rule>
Run Code Online (Sandbox Code Playgroud)

在此处找到解决方案:301重定向在IIS 7中不起作用