我想忽略对我的服务器的所有 *.php 请求。
现在我可以忽略根目录上的 .php 请求了
routes.IgnoreRoute("{resource}.php");
如何忽略到处都有的请求,就像这样:
www.site.com/products/index.php
www.site.com/clients/africa/info.php
根据this以下内容可以工作
routes.Ignore("{*allphp}", new {allphp=@".*\.php(/.*)?"});
你尝试过吗
routes.IgnoreRoute("*/{resource}.php");