我不是一個ASP開發人員,所以在這裏很失落。需要建立一個規則,將任意流量傳入服務器,並將文件名中的.asp重定向到另一個URL。這是我在我的web.config文件中。重定向所有流量
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Migrate to PHP">
<match url="^([_0-9a-z-]+).asp" />
<action type="Redirect" redirectType="Permanent" url="/site/404" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
這適用於/foo.asp,但/bar/foo.asp不起作用。我怎樣才能在那裏得到一個通配符?
你有沒有配置IIS讓請求.asp文件來通過對ASP.NET運行時? – 2011-03-23 20:28:44