This project is read-only.
The DNN Url Redirect Provider is an all-purpose redirect solution. It allows the listing of a set of URLs that must be redirected, and where they should be redirected to. This can be used for DNN pages, files, legacy URLs from old sites - anything at all. There is no requirement to tie a redirect to a specific DNN page.

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. Only works with DNN 7.1 or later - no other versions will work.
2. Install this provider via host->extensions
3. Navigate to admin->site settings -> Advanced URL Settings, and ensure that the provider is enbled for the specific portal.
4. Go to your sql server and open the dnnurpRedirect 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
RedirectOrder : 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

See SQL to insert a new redirect record for more examples of actual SQL to insert redirect records.

6. Restart the app or use the 'Clear Cache' option in DNN (rules are cached, so a restart currently needed to flush the cache, this can be improved later with a 'refresh' button)
7. Test the URL redirects out with a tool like Fiddler to ensure they are working as expected.

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 May 16, 2014 at 6:00 AM by brucerchapman, version 2

Comments

efficiondave Jul 10, 2014 at 3:56 AM 
I'm trying to do redirects of .html pages and it doesn't seem to be processing them. Is there something I can do to make this work for .html pages?

Panos_M May 10, 2014 at 12:10 AM 
I have an extended problem with redirecting greek URLs after installing the Greek language and adding Page names in Greek characters. Will this extension solve the problem?