我不是一个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