DNN 7.1 includes a new feature for the Friendly URL Provider known as Advanced URL Management. It adds some additional functionality such as extension-less URLs, and 404 handling. Advanced URL management is on by default in new installations of DNN 7.1+, but will not be active for upgraded installations.
Upgraded installations will more than likely still be using 'humanfriendly' mode (unless set otherwise). To switch from 'humanfriendly' or default mode to 'advanced' mode, follow these steps:
- Take a backup! You should only need a backup of the web.config file, but feel free to make a full backup of the site if you are concerned about any issues.
- Open your web.config file and search for 'urlformat'. The section you are looking for will look like this:
(note that the urlformat="humanfriendly" section may just read as urlformat="", depending on your config)
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="humanfriendly" />
- Once you have found the appropriate section, replace the urlFormat="humanfriendly" section with urlFormat="advanced", like so:
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="Advanced" />
- Save your web.config file.
- Your site should now be using the Advanced URL format by default, and you should begin seeing extension-less URLs such as exampledomain.com/Contact-Us.
If you experience any issues, you should be able to simply replace the current web.config with your backup copy.
Additional information regarding Advanced URL Management can be found on the official DNN wiki here:
Article ID: 2053, Created: October 14, 2014 at 9:53 AM, Modified: March 26, 2015 at 12:17 PM