0
我正在使用这个答案https://stackoverflow.com/a/13861795/848513,它非常适合我的站点上不再存在的静态文件转发到新的文件位置。IIS URL重写 - 带有动态文件
但我也有一些动态的URL需要被转移到新的地点,和下面的代码似乎并没有工作:
作品:
<rule name="SpecificRedirect50" stopProcessing="true">
<match url="aboutus.php" /> <!-- static URL -->
<action type="Redirect" url="/about-us" redirectType="Permanent" />
</rule>
不起作用:
<rule name="SpecificRedirect1" stopProcessing="true">
<match url="topic.php?id=39" /> <!-- dynamic URL-->
<action type="Redirect" url="/folder/?id=520" redirectType="Permanent" />
</rule>
尝试访问www.site.com/topic.php?id=39时出现的错误是404未找到错误 - 即,它未被重写脚本过滤。
格式应该是什么?
感谢