DNN Blog

Oct 10

Posted by: Scott McCulloch
10/10/2005  RssIcon

I've just checked in some minor changes for Friendly URLs for DotNetNuke.

In 3.1.1, I introduced a change to only rewrite alphanumeric and the space character. (Everything else would be left in the querystring).

For example:-

http://www.dotnetnuke.com/default.aspx?tabid=5&path=folder1/folder2

Becomes:-

http://www.dotnetnuke.com/tabid/5/default.aspx?path=folder1/folder2

This worked as designed and helped to alleviate a number of special character issues we were having. However, it also caused some common URLs not to be rewritten, these involved the dash (-) and the underscore (_) character. These are commonly used when selecting a language. (e.g. en-AU)

So for 3.2, these characters will be rewritten into the URL. Moreover, you can also customise the regular expression in the web.config as now it belongs to the provider as an attribute as follows:-

  <friendlyUrl defaultProvider="DNNFriendlyUrl">
   <providers>
    <clear/>
    <add name="DNNFriendlyUrl"
     type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules.UrlRewrite"
     includePageName="true"
     regexMatch="[^a-zA-Z0-9 _-]" />
   </providers>
  </friendlyUrl>

Tags:
Categories:

2 comment(s) so far...


Re: Friendly Url Changes for DotNetNuke 3.2

Thanks Scott!

By pspeth on   10/10/2005

Re: Friendly Url Changes for DotNetNuke 3.2

Nice solution!

By RLyda on   10/10/2005
Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me
DotNetNuke Store

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

PowerDNN
r2integrated
Telerik JustCode Free

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.