We use a custom urlrewiter on our .net sites and set a wildcard mapping to redirect any request to the .net isapi filter for processing.
This works fine but we have noticed an issue with our custom 404 pages not working and iis handling the 404s instead. We configure the custom errors in the web.config as follows
<customErrors mode="On">
<error statusCode="404" redirect="/404.aspx"/>
<error statusCode="500" redirect="/500.htm"/>
</customErrors>
I noticed that the custom errorpage is served if I request an page with an aspx extension (www.mysite.com/madeuppage.aspx) but not an invalid directory (www.mysite.com/madeupdirectory/). I guess this is because IIS is passing aspx pages to the .NET enginbe for handling but I thought the wildcard mapping would pass directorys too?
This could be fixed by me configuring the custom error page in IIS but I would rather this be configured in the web.cofig if possible? Any ideas?