Aim
To increase the readability of Urls contained within the DotNetNuke project. This is a free downloadable project provided by Ventrian that contains full source code.
Features
The following is a list of items that are either planned for development or are in the current release.
1. Human Readable URLs for Pages - [COMPLETE]
The first required feature for this project is the introduction of a URL that is easily readable by humans.
For example, typical URLs in DotNetNuke, may look liks this:-
http://www.ventrian.com/Support/ProductForums/tabid/118/default.aspx
We ideally want to extract the system key, /tabid/118/ and be left with:-
http://www.ventrian.com/Support/ProductForums.aspx
This feature is currently implemented in the current version of the provider, URLs using the old format will still continue to resolve.
2. Removal of Duplicate URLs for tokens such as [TERMS], [PRIVACY], [LOGIN], [REGISTER] - [COMPLETE]
A problem with dotnetnuke are the controls that generate additional URLs based on the page you are on. These URLs point to the terms, privacy, login and register pages. A search engine may punish your site if you have a single page with the same content, but tie it to multiple URLs, it is also a waste of time for the crawler to search those pages.
For example, if you search dotnetnuke.com in google, and look for the following:-
site:www.dotnetnuke.com ctl/privacy
You will find 100s of pages, all pointing to the same page, but with the same content. If you add in a unique page for every piece of forum content (unique url), a deep index will visit many redundant pages for no reason.
This enhancement takes those tokens, and writes them out to the root of each site, as follows:-
All instances of the tokens in skins, will point to those URLs.
This feature is currently implemented in the current version of the provider, URLs using the old format will still continue to resolve.
3. Improved Handling of the Child Portal Url - [NOT COMPLETE]
A problem currently exists for child portals, where the first request actually becomes:-
http://www.dotnetnuke.com/Default.aspx?alias=www.dotnetnuke.com/contest
When you request:-
http://www.dotnetnuke.com/contest/
Ideally, we want the URL to look like:-
http://www.dotnetnuke.com/contest/default.aspx
Items for Discussion
The following is a list of items that are up for discussion. You may discuss these ideas in the forum here.
1. Human Readable URLs for Pages with Multiple Parameters
Performing transformations in "Human Readable URLs for Pages" was fairly simple, as it just requires a lookup on the internal field on the tabs table known as "TabPath". A problem occurs when you have multiple parameters, what should the URL look like for?
http://www.ventrian.com/Support/ProductForums/tabid/118/view/topics/forumid/1/Default.aspx
Obviously, it would be nice if the /tabid/118/ would disappear, but where should the other parameters go? /View/Topics/ForumID/1/
Installation (for 4.5.5+)
This provider will replace your existing URL provider, to install follow the below instructions:-
- Backup your existing provider, by making a copy of:-
- <DNN INSTALLATION DIR>/bin/DotNetNuke.HttpModules.UrlRewrite.dll
- <DNN INSTALLATION DIR>/web.config
- Download the Friendly URL provider from the module below
- Extract the zip file into your <DNN INSTALLATION DIR>/bin/ directory. It should only be 1 file (Ventrian.FriendlyUrl.dll) and replace the existing file. (You should have already backed that file up)
- Open up <DNN INSTALLATION DIR>/web.config and change the following:-
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules.UrlRewrite" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="HumanFriendly" />
becomes
<add name="DNNFriendlyUrl" type="Ventrian.FriendlyUrl.DNNFriendlyUrlProvider, Ventrian.FriendlyUrl" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="HumanFriendly" />
and
<add name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules.UrlRewrite" />
becomes
<add name="UrlRewrite" type="Ventrian.FriendlyUrl.UrlRewriteModule, Ventrian.FriendlyUrl"/>
Once you have done this, you may run your site, if you ever want to switch back, you can set urlFormat="SearchFriendly"
Installation (for older downloads)
This provider will replace your existing URL provider, to install follow the below instructions:-
- Backup your existing provider, by making a copy of:-
- <DNN INSTALLATION DIR>/bin/DotNetNuke.HttpModules.UrlRewrite.dll
- <DNN INSTALLATION DIR>/web.config
- Download the Friendly URL provider from the module below
- Extract the zip file into your <DNN INSTALLATION DIR>/bin/ directory. It should only be 1 file (DotNetNuke.HttpModules.UrlRewrite.dll) and replace the existing file. (You should have already backed that file up)
- Open up <DNN INSTALLATION DIR>/web.config and add the following change in (the addition is in bold):-
<friendlyUrl defaultProvider="DNNFriendlyUrl">
<providers>
<clear />
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules.UrlRewrite" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="HumanFriendly" />
</providers>
</friendlyUrl>
Once you have done this, you may run your site, if you ever want to switch back, you can set urlFormat="SearchFriendly"