DotNetNuke Blog

Current Blog | Categories | Search | Syndication

Human Friendly URLs  By Jeff Smith
Thursday, November 15, 2007 10:43 PM :: 639 Views :: 1 Comments :: Article Rating :: DotNetNuke, Search Engine Optimization Send A Message

A new feature in DNN 4.7 is the "human friendly urls". Instead of displaying the long URLs with tabid (Example: http://www.domain.com/tabid/123/default.aspx), by adding an attribute to the DNNFriendlyURL provider in your web.config, you can provide URLs using the page name only (Example: http://www.domain.com/Home.aspx). This is great for not only being able to give other people simple URLs to pages on your site, but also for search engine optimization.

 

To make the change, simple add the following attribute: 

urlFormat="HumanFriendly"

to the following line in your 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="HumanFriendly" />
      </providers>
    </friendlyUrl>

 

By D McSorley @ Tuesday, November 20, 2007 2:54 PM
Great tip! This is really helpful. Thanks, DM

Comments
You must be logged in to post a comment. You can login here
 Print   

 © 2007 - Venexus, Inc. - All rights reserved Terms Of Use | Privacy Statement