简体   繁体   中英

ASP.net URL rewriting conflicts with image folder?

I have the rules:

<rewrite url="~/construct2" to="~/construct2.aspx" processing="stop"/>
<rewrite url="~/construct" to="~/Handlers/PermRedirect.ashx?URL=construct2" processing="stop"/>

Along with many many more.

When I attempt to visit:

http://84.45.57.142/images/construct2-screenshot.jpg

It seems to activate these rules and redirect you to construct2.aspx. Does anyone know why? I thought ~/construct would only match root directory/construct not any directory/construct*

尝试:

<rewrite url="~/construct2$" to="~/construct2.aspx" processing="stop"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM