Why does this work?
I'm using DNN 6.1.5 and I wanted to create vanity URLs for Landing Pages off the main menu. I created pages not on the menu but at the top menu level. It worked great, even with re-direction to the actual target page. However on one site I was able to drop the .aspx extension and it still worked. On newer sites, I would get a 404 error, page not found.
After checking the web.config files I found that the site that allow me to drop the .aspx did not have the ManagedHandler precondition for the URL Rewrite module. Once I removed it, I was able to use http://mysite.com/landingpage without the .aspx. This is the line in the web.config:
<add name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules" preCondition="managedHandler" />
I just removed the preCondition="managedHandler" from that item and it worked.
On the older site that gave me this idea, it was also running 6.1.5, but had been upgraded each release from 4.9. On the new site, it had started as a 6.0 site and had preCondition="managedHandler" on all the add modules. I did a little research and found that this is new with IIS 7.0. On http://blogs.iis.net/thomad/archive/2... they say:
Handlers and Modules can now be written in managed code and directly integrated into the IIS request pipeline. But switching between managed and native code is an expensive operation. The managedHandler precondition was introduced to allow optimizing the performance of requests where no managed code needs to be involved, for example when static files (.html, .jpg etc.) are served. No managed code is called if the request is served by a native handler and every managed module is configured with the managedHandler precondition.
So, this seems to be an efficiency thing. These sites a relatively low traffic, so I think this will work fine. However, I am wondering what the expert community thinks about this, and am also wondering why taking out the preCondition allows the URL Rewriter to work with no .aspx extension, while putting in the preCondition makes it not work. Is there a native URL Rewriter? Care to shed any light? Thanks.