kipusoep/UrlTracker — pull request #40 by sandromastronardi (2014-11-19 14:39:56+00:00)
Title: Domain on child node with cross site/host redirects

When there is a dual level redirect structure with a domain on the first level, and a culture on a second, then the second level wasn't available in the rootsite dropdown...
Added is now a configuration value to enable this...
it will work like this for example:
http://www.site.com/primarysite/nl
primarysite has the domain http://www.site.com/primarysite
and nl has the language added to it (counting as a domain for umbraco)

The dropdown will show primarysite/nl and primarysite/en if there are two child sites...
To prevent global redirects on http://www.site.com/redirect to be bound to the primary site, but have them work for all domains (also if sorting changes), it is now possible to bind them to the -1 root... causing it to work on every request, unless there is an override from a specific site... Hence the dropdown shows the root (/) as first item when more domains are found. Also redirects will be relative to the full domain, so it will work if the redirect 'test' is www.domain.com/test but also if the domain is configured as www.domain.com/site the redirect will be www.domain.com/site/test

A few strings where replaced by their constant alternatives (in the Uri class)

Because the multilevel sites can also have different hostnames the redirects will now also work if the redirect is to a site on another hostname, the redirect will then have the full hostname... if the redirect is to a link internal to the current site (regardles of which hostname is currently used to access the site) it will do a relative redirect to prevent redirects to always go to the primary domain...
The visualisation also shows this by showing the full Url if the redirect will be cross domain...

If there is only one domain and in the style of www.site.com/corporate (so no www.site.com alone) then the dropdown to choose root is available when editing and creating... otherwise it would not be possible to create redirects like www.site.com/redirect