Screenpicture with a token in the From url of Redirect

Use tokens in "To" paths in Redirect module.


Configure Redirect as normal

Go to /admin/config/search/redirect and add or edit a redirect.

Example of path replacement

From: account/edit
To: user/[current-user:uid]/edit

Example of query replacement (FacetAPI)

From: users/same-role
To: searchapidefaultuserindex/?f[0]=roles:[current-user:roles:keys:first]

Note: use unescaped url's

Be sure you paste unescaped url's in the Redirect interface. If you don't the redirect will not work. Say the above query is replaced to (unescaped):
in your browser it will look like (escaped):

Where %3A means colon :
and %20 (not in this example) means a space
and %3F (not in this example) means a questionmark ?
and %5B (not in this example) means a open bracket [
and %5D (not in this example) means a close bracket ]

Note: anonymous users

All 'current-user' tokens are dismissed for anonymous users.

Security considerations

To create a redirect a user must have "Administer URL redirections" permission.
This module only replaces tokens in To-paths, the From-paths cannot have tokens.
For anonymous end-users tokens from the 'current-user' group are not processed, but all other tokens will be evaluated by token_replace().
So carefully choose what tokens you expose.

Project Information