开发者

ASP.net URL rewriting conflicts with image folder?

开发者 https://www.devze.com 2023-03-15 22:07 出处:网络
I have the rules: <rewrite url=\"~/construct2\" to=\"~/construct2.aspx\" processing=\"stop\"/> <rewrite url=\"~/construct\" to=\"~/Handlers/PermRedirect.ashx?URL=construct2\" processing=\"st

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 开发者_JS百科rules and redirect you to construct2.aspx. Does anyone know why? I thought ~/construct would only match root directory/construct not any directory/construct*


Try:

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

精彩评论

暂无评论...
验证码 换一张
取 消