开发者

URL Routing Encoded URLs in web application

开发者 https://www.devze.com 2023-02-05 22:09 出处:网络
My goal is to move away from an ISAPI filter that was set up and instead do all the rewriting/routing at the application level.

My goal is to move away from an ISAPI filter that was set up and instead do all the rewriting/routing at the application level.

I have URLs like: product开发者_Go百科.aspx/2008C20080929.htm

I can correctly route those pages using the following RouteTable.Routes.MapPageRoute:

RouteTable.Routes.MapPageRoute("testRoute", "product.aspx/{page}", "~/routeTest.aspx");

However, some of the other URLS are "encoded", example:

product.aspx/%255COH%255C2008%255C20080929.htm

I am unable to route these pages with the previously stated route. Is this not possible? I'm getting 400 bad requests.


Instead of using URL Routing, I used IIS7's Rewrite Module URL Rewrite

0

精彩评论

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