default.aspx

Apr 8, 2014 at 5:11 PM
I'd like default.aspx to be rewritten to just /
Is there anyway to do that? I've tried adding aliases of /default and /default.aspx with 301s but it doesn't seem they are getting processed as it still goes to /default.aspx.
Apr 9, 2014 at 7:58 AM
Edited Apr 9, 2014 at 7:58 AM
With DNN7 you can have extensionless URL's as soon as you switch to urlFormat="advanced" in web.config
<friendlyUrl defaultProvider="DNNFriendlyUrl">
  <providers>
    <clear />
    <add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="advanced" />
  </providers>
</friendlyUrl>
With this setting the _www.yoursite.com/default.aspx_ will be rewritten to _www.yoursite.com_ by default.
Reto
Coordinator
Apr 9, 2014 at 2:11 PM
I didn't quite follow. Are you trying to get extensionless URLs?

So, instead of "www.mydomain.com/default.aspx", you would have "www.mydomain.com" or do you really want it to be "www.mydomain.com/"?
Apr 9, 2014 at 3:02 PM
I've got advanced on and so have extensionless URLs. I'm getting duplicate page errors from SEOMoz since sometimes the home page is www.mysite.com and sometimes its www.mysite.com/default.aspx. I've put a rel=canonical on the page but I'd still like www.mysite.com/default.aspx to get 301 redirected to www.mysite.com.
Coordinator
Apr 9, 2014 at 3:13 PM
I see. I am able to replicate the issue, but I've never noticed it before. I'd suggest you contact Bruce Chapman at DNN as he is the expert on URL rewritting. All this module does is provide a UI for setting the variables that controls how the rewritter functionality works. There isn't really any functional logic behind this module.