i have created simple httpmodule rewrites incoming path 1 matches route in mvc. ex.:
http://www.example.com/cars.html -> http://www.example.com/home/vehicles/3
to rewrite path use rewritepath on httpcontext.
the problem while works in iis express, doesn't seem work in iis. can see url rewritten, 404. seems happen beacause instead of matching rewritten route against registered routes, staticfilehandler tries handle request.
so when http://www.example.com/cars.html entered browser, on iis error page, see requested url: http://www.example.com/home/vehicles/3 correct, see tries load physical path: x:\project\site\home\vehicles\3.
if enter rewritten path browser, page loaded , works expected, routes ok.
any ideas how rewrite path httpmodule rewritten path matched against registered routes in mvc? or ideas missing? :)
cheers adam
Comments
Post a Comment