使用 IIS7.5 和 ASP.net,我有重写规则:
<rewrite url="~/store/playgame/([0-9]+)/(.*)" to="~/handlers/storeGetPlayGameContent?p1=$1&p2=$2" processing="stop"/>
这适用于 URL:
http://127.0.0.1/store/playgame/1/c2runtime
Requested URL: http://127.0.0.1:80/handlers/storeGetPlayGameContent?p1=1&p2=c2runtime
但对于网址:
http://127.0.0.1/store/playgame/1/c2runtime.js
Requested URL: http://127.0.0.1:80/store/playgame/1/c2runtime.js
如您所见,请求的 URL 现在不正确。任何带有 NOT 文件扩展名的 URL.aspx
都将被错误地重写。