Url Redirect Provider for DotNetNuke and Url Master

The Url Redirect Provider is essentially a list of to/from Urls to be redirected. These Urls can be anything- they aren't restricted to DNN pages or pages within third party Urls. They can be .pdf files, .jpg files, .aspx Urls - from whatever to wherever. This provider has been built to give a one-size-fits-all solution to all those sticky redirect issues.

Instructions for Use

1. Url Master module must be installed + module providers enabled
2. Install this provider via host->extensions
3. Navigate to admin->portal urls, and tick box next to 'iFinity Url Redirect Provider', and apply changes. No need to select pages.
4. Go to your sql server and open the dnniftyurp_Redirect table directly for editing. This is the table that contains all the redirects.
5. The columns in the redirect table are as follows:
  • RedirectId : guid, auto generated for new rows
*PortalId : for portal redirect applies to
*RedirectOrder : sequence number for returning rules in order
*HttpAlias : portal alias that redirect applies to (ie example.com if redirecting to/from example.com)
*RedirectUrl : Url to be redirected. Either absolute or relative (absoltue : http://examle.com/to-be-redirected) Relative is without http:// and portal alias so (/to-be-redirected)
*MatchType : Relative or Absolute (text) to match RedirectUrl value
*KeepQueryString : if true, any query string on the requested url is carried over to the redirected url. If false, querystring is discarded
*DestTabPath : if redirecting to a DNN page, tab Path (ie //AboutUs) Null if redirecting to an absolute Url, or if DestTabId is supplied
*DestTabId : TabId for page if redirecting to a DNN page (alternate way of specifiying page, see DestTabPath. Null if using either DestTabPath OR if using Absolute Url
*DestUrl : When redirecting to Absoltue Url, the Url to redirect to (ie example.com/this-is-the-new-url) OR if redirecting to Tab, the path to append to the end (ie /entryId/12/this-is-a-post). NOTE: if using 'Url' as DestType and no http:// found, will add on the requested scheme and the HttpAlias as specified.
*DestType : Either 'Tab' for redirecting to a tab, or 'Url' if redirecting to an absolute Url
*IsRegex : if true, the RedirectUrl and DestUrl values can be a regex pattern / replace pattern respectively. False if not using regex patterns

Here's an example of a table row for redirecting a simple to/from Url:
PortalId : 0
RedirectOrdre : 10
RedirectUrl : /some-other-url.aspx
MatchType : Relative
KeepQueryString : false
DestTabPath : NULL
DestTabId : NULL
DestUrl : /some-new-url.aspx
DestType: Url
IsRegex : False

This redirects http://example.com/some-other-url.aspx to http://example.com/some-new-url.aspx

6. Restart the app (rules are cached, so a restart currently needed to flush the cache, this can be improved later with a 'refresh' button)
7. You can test out the redirects in the Test Url Rewriting section of Url Master.

This particular project can be greatly improved with a UI for entering the redirect rules and button for flushing and rebuilding the cache. Any project volunteers are greatly welcome - please contact via the Discussions.

Last edited Mar 22, 2013 at 6:33 AM by brucerchapman, version 3


No comments yet.