DNN 7.1 replaces FriendlyUrlProvider? (problems removing it)

Mar 25, 2014 at 2:44 PM
Edited Mar 25, 2014 at 2:46 PM
Hello,

After a upgrade to 7.2 (from 7.0x), we had to remove the FriendlyUrlProvider (otherwise we ran into troubles during the update process).
We removed the files from the web.config and the DLL from the \bin\ directory.

This site: https://friendlyurlprovider.codeplex.com/ states: "PLEASE NOTE : With the release of 7.1 of DNN Platform, this project is effectively redundant. DNN 7.1 Advanced Urls provide all of the functionality that this project has."

As soon as we remove the provider we run into a lot of troubles and I don't know IF (and how) DNN has a built-in alternative for it.
  • Pages with spaces are not converted to underscores anymore and pages with underscores do not resove anymore. We have to type a - (minus) instead of a space now. Example: www.xxxx.com/Page/New-Order which was www.xxxx.com/Page/New_Order in the past.
  • Lot's of other link issues, especially with parameters/popups.
This is the line we had configured for the FriendlyUrlProvier:
<add name="iFinity.FriendlyUrl" type="iFinity.DNN.Modules.FriendlyUrl.DNNFriendlyUrlProvider, iFinity.FriendlyUrlProvider" includePageName="true" regexMatch="[^\+a-zA-Z0-9 _-]" urlFormat="HumanFriendly" redirectUnfriendly="true" doNotRedirect="SearchResults;" doNotRedirectREgex="__ge|__gv|ctl|wizardstep|LanapCaptcha\.aspx" checkForDupUrls="true" forceLowerCase="false" redirectWrongCase="false" replaceSpaceWith="_" logCacheMessages="false" pageExtensionUsage="never" triggerDictionaryRebuildRegex="&amp;ctl=tab|/ctl/tab|/Admin/Tabs/" />
After the upgrade we decided to install the FriendlyUrlProvider again (inserting the lines in the web.config and copying the DLL to the \bin\ folder).

We tried the DotNetNuke FriendlyUrlProvider with urlFormat="HumanFriendly" as well as urlFormat="advanced".
Apr 2, 2014 at 4:26 AM
The functionality to replace the friendly url provider all exists in DNN 7.1 + - but when you switch on the 'Advanced' URLs it won't automatically pick up all of the settings that you had for the friendly url provider.

All of these configuration settings - replaceSpaceWith, doNotRedirectRegex, forceLowerCase, redirectWrongCase, etc - these all exist in DNN 7.1 as host/portal settings. However, you'll have to go in and add these settings into your database instead of your web.config file. These are saved in the HostSettings table. I don't have the list of keys handy, but if you look at the FriendlyUrlSettings.cs file in the DNN Source code you can see the Key values used in the Host Settings table. Once you have figured out what you need, then you can just insert the values where they do not match the default value into the Host Settings table directly. The default values can be seen in the public FriendlyUrlSettings(int portalId) method of the code file.

Procedurally, this means you need to :
  1. For each attribute in your old web.config declaration, find the equivalent DNN setting key (if it exists, some are no longer valid, like 'triggerDictionaryRebuildRegex')
  2. Determine if the default value for that key is different to the one you have been using
  3. If the default value doesn't match your old web.config attribute, insert it into the HostSettings table
  4. When finished, either restart the site or clear the cache to pick up the new values.