This section describes how DNN Redirect works. This is good to know
in order to achieve best results and avoid inconsistencies.
DNN Redirect implements a fall back mechanism, some rules are before
others and the first rule to be found is always used. If no rule matches then the defaults are used.
The order is as
follows:
PARAMETER Rules - First DNN Redirect checks Parameter Based redirects to see if any matches current context. If so, the redirection happens and the execution ends.
Before checking the conditions DNN Redirect invokes
My Tokens to replace tokens inside Parameter Name and Parameter Value fields.
REFERRER Rules - Second type of rules that are checked are those based on referrer.
Before checking the conditions DNN Redirect invokes
My Tokens to replace tokens inside Check Referrer field.
ROLE Rules -
DNN Redirect checks if there's any rule that matches roles of current
user; if any is found, it will redirect to the URL that is associated
with the rule.
GET Parameter of Current
Page - If none of the rules match, DNN Redirect will check the defaults. First, it will check for the named GET parameter
in current request. If the parameter is found, then it redirects to
whatever value is in that parameter.
GET Parameter of Previous
Page - Same thing as above happens for the URL of referrer
(basically, previous page).
Default URL - If no
rule matches, then DNN Redirect looks if there's a default URL and
redirects there.
No Action - If the
Default URL is not specified, then the user is allowed on current page.
This basically means you have a logic for this, either to allow only
certain roles to access current page or to pass through to DotNetNuke
internal logic.
What if for example I want the ROLE rules to be checked before PARAMETER Rules?
Or, with other words, how do you specify the order in which rules are evaluated?
This isn't supported in DNN Redirect, it's only available in
Redirect Toolkit (this is possible because Redirect Toolkit features a generic unified interface for all rule types).
However, this can be achieved in DNN Redirect with a work around: create multiple DNN Redirect modules on the page and stack them in the order you want them to run.
If a rule from first module matches, a redirect will happen and the second module will not get
to execute. But if they don't match, then the second module will run and redirect accordingly and so on.
Go to DotNetNuke DNN Redirect Homepage