I do the easy version of URL Rewriting ;-)
Say I want to see a URL in the browser that looks like
http://www.thingy.co.uk/English.News.23 that maps to
http://www.thingy.co.uk/news.aspx?La...glish&Story=23.
In global.asax BeginRequest I change the path using
HttpContext.Current.RewritePath("news.aspx")
I pass the querystring too and add an extra item to the querystring to say
waht the original URL was. I then pick this out in the page and use
HttpContext.Current.RewritePath to change the path again for postbacks.
Following this, the caching all goes to pot.
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:29**********************@msnews.microsoft.com ...
When do you do the Url Rewriting? In global.asax? What method/event? The
output cache gets involved in the HttpPipeline fairly early, so you'd need
to plan when to do the rewriting. I've not tested the two together, so I'm
not sure what the results would be. I'll flag this post so I can go do
some testing. Fun stuff :)
-Brock
DevelopMentor
http://staff.develop.com/ballen
Can these two functions coexist?
We have a web site where the querystrings are removed using URL
Rewriting. Instead the page appears to be a html page with a long name
(containing what would be in the querystring).
I have tried switching on output caching and varying by a parameter
and using VaryByCustom but the caching simply does not work. Tested
it by adding the time to the bottom of the page and the time updates
every time we refresh the page, even though the timeout on the cache
is 60 seconds.
Can anyone shed any light?