>The bottom line for this "trick" is to create a wildcard ( * ) handler in IIS
>that points to the aspnet_Isapi.dll which means that all requests without a
>known file extension get sent throug ASP.NET, where you can process using
>typical REGEX url-rewriting techniques.
The only problem with that is that it can put an unnecessary strain on
the server as *everything* is then sent through the ASP.NET engine.
Another solution is to create a Hats folde and add a default.aspx file
to it. This file does not need to do anything as the engine will
redirect to the real URL anyway, it's just there to get ASP.NEt to
process the request.
This is only practical if you have a smallish number of folders you want
to use. If you many, or if they change regularly, then this may not be
practical.
You could consider using URLs like /Hats_ReallyCoolHat.aspx which will
save you the hassle, and be better for the search engines as it looks
like a top-level folder instead of a second-level one like you
suggested.
HTH
>-- Peter
>Site: http://www.eggheadcafe.com
[quoted text clipped - 24 lines]
>> How do I make Asp.Net handle this, so I can catch requests to /Hats/ in
>> global.asax Application_beginrequest?

Signature
Alan Silver
(anything added below this line is nothing to do with me)
Peter Bromberg [C# MVP] - 08 Jul 2007 22:48 GMT
As another alternative, you can map the 404 handler in IIS to 404.aspx where
you can do urlrewriting based on urls like "http://mysite/user/joshmoe" -
with no extension. I haven't tested this for performance, but it does work -
IIS will call the 404.aspx page and append the requested "bogus" url onto the
querystring.
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder(BETA): http://www.blogmetafinder.com
> >The bottom line for this "trick" is to create a wildcard ( * ) handler in IIS
> >that points to the aspnet_Isapi.dll which means that all requests without a
[quoted text clipped - 48 lines]
> >> How do I make Asp.Net handle this, so I can catch requests to /Hats/ in
> >> global.asax Application_beginrequest?