开发者

Problem with Intelligencia.UrlRewriter

I am trying to use the Intelligencia.UrlRewriter tool that has already been used extensively on project I've inherited, where the application is deployed to II6. I am trying to fix a bug in the application that occurs when trying to rewrite certain url's.

The following rewrite entry matches both web addresses ~/foo and ~/foo/ propery and rewrites the URL correctly:

<rewrite url="~/foo[/]?$" to="~/Default.aspx" />

but this rewrite entry only matches ~/bar/foo and not ~/bar/foo/ and when ~/bar/foo/ is entered I receive an ASP.NET server error page with the error: 开发者_C百科"Cannot use a leading .. to exit above the top directory.":

<rewrite url="~/bar/foo[/]*?$" to="~/Default.aspx" />

So, I am trying to get the second entry to properly rewrite the URL for the ~/bar/foo/ web address.

I am using ASP.NET v 2.0 and it is deployed to Windows Server 2003 using IIS v6.0. Any help would be greatly appreciated.

BTW: I have read ScottGu's blog entry about URL rewriting (link) and was really hoping that I don't have to reimplement the functionality using an ISAPI filter because upgrading to IIS7 is most likely not happening anytime in the forceeable future and I'm a little time constrained.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜