Simon Fell > Its just code > Context.RewritePath
Monday, August 4, 2003
I've been working on an ASP.NET app that uses Context.RewritePath to give friendly style URLs (ala mod_rewrite), everything was working great, but have run into a problem where it doesn't play well with smartNav and redirects. Seems smartNav (which I'm slowing growing to hate its implementation (but not the idea), see my earlier problems with large uploads and smartnav) is not handling the redirect request. The chain of events is
- user surfs to 1.aspx
- a http module (or global.asax) calls Context.RewritePath("one.aspx") during the BeginRequest event
- one.aspx displays a web form to the user
- user clicks on the webform, it does a postback, one.aspx handles the postback event and redirects to two.aspx
- IE shows a blank page, with one.aspx in the address bar, it appears to just eat the redirect request