OK, my time off/away from the tech world is over, so non-techies, look away else be blinded by the light…
Contrary to prior promises, I still haven’t gotten organized enough to create articles here. I mean I have alot of ideas, but alot of my stuff fits more into an FAQ, not an article per topic. It’s the same approach I use in the newsgroups; I try to get people the info they need, I’m not going to re-explain how the wheel was created, I’ll help give some introduction, and then let another site do the talking. There’s no need for me to create yet another FAQ, to provide yet another site to monitor to look for perhaps your one question. And sometimes I’ll have plenty of original content of my own, related to some problem I had to solve today, etc.
Which is why this blog fits that so well; I’ll keep posting techie entries, under the appropriate category, and you can always use the search function of this site to see if I’ve ever talked about your question/quandry. Remember, my specialty is the .NET world, although as other topics come up (such as XML, etc.), don’t be surprised if I drop a link here and there.
And feel free to drop me questions; I’ll always try to answer what I can. I can’t be all your R&D, but I can help either answer or direct you to the answer.
OK, enough of the disclaimer/instructions, onto the goods! My first tidbit comes partly from work, but also a question posed by a direct email I received; it’s related to search-engine friendly URLs (aka search-engine safe URLs). URL rewriting with ASP.NET has always been possible, so with a little ingenuity, we can create an HttpModule that supports search-engine safe URLs. It filters/rewrites the URL not only on the inbound request, but within the outbound stream. This way you can still use your ‘normal’ URLs in your pages/code, and not have to recode all of your links…
The ONLY problem with this approach is that you are using an ASP.NET mechanism; unless the request actually makes it to the aspnet_wp process, none of this code can do its magic. Therefore, the request must be mapped to be handled by the aspnet_wp process (i.e. the file extension is handled by aspnet_wp), which is not necessarily ideal for all file types, or if you wish to really mask the URL by making it look like you’re running PHP, e.g., excluding .aspx from the URL.
Therefore, still the most complete (and easiest) method to accomplish this is via an ISAPI rewriter. These dlls are injected sooner into the request handling cycle of IIS, and can therefore influence all incoming requests. But of course they are usually written in C++, making them harder to create/maintain yourself.