D7: I'm going to update an articles path pattern (/articles/[node:uid] → /post/[new tokens]) but I need redirect users from old path to new one using tokens. And I don't know how to do that.
I tried using the Redirect module, but it allows set only separate URL for each node; no group redirect patterns are allowed. Also the Rules module doesn't allow to set patterns. How can I achieve this?
The problem partially solves by applying "Update url alias" option in admin/content. I do not find out how to show all selected type nodes at one page without pages, because it is terrible slow applying option page by page.
Anyway, by this way, old aliases still exist, work, and don't redirect to new aliases.
You can use the pathauto module to construct your node aliases from tokens (admin/config/search/path/patterns). In addition, there is a setting to tell pathauto to leave the existing alias in place when creating a new one. At admin/config/search/path/settings, you can specify this in the Update action section:
You can use globalredirect module to redirect from one url to another url.
Checks the current URL for an alias and does a 301 redirect to it if it is not being used. Checks the current URL for a trailing
slash, removes it if present and repeats check 1 with the new
Checks if the current URL is the same as the site_frontpage and redirects to the frontpage if there is a match.
Checks if the Clean URLs feature is enabled and then checks the current URL is being accessed using the clean method rather than the
Checks access to the URL. If the user does not have access to the path, then no redirects are done. This helps avoid exposing private
Make sure the case of the URL being accessed is the same as the one set by the author/administrator. For example, if you set the alias
"articles/cake-making" to node/123, then the user can access the
alias with any combination of case.
Most of the above options are configurable in the settings page. In Drupal 5 you can access this after enabling the globalredirect_admin
module. In Drupal 6, the settings page is bundled into the module.