Project Removal/Redirection plugin¶
- Project Removal/Redirection plugin
When removing or archiving a project one should always remember, that there can be some links saved in users’ bookmarks, search engines’ databases, forums etc. After removing or archiving such links will point to the error page having no explanation about what happened, why project has been removed, did it move to some other location etc. So for these reasons it is better not to remove/archive projects in Redmine and ChiliProject unless...
By installing the Project Removal/Redirection plugin for Redmine and ChiliProject you can now get rid of these issues. With this plugin removing behaves as before but archiving allows at least to specify a custom text, which can explain the reason for project removal. But it also allows to redirect users to another location – this can be just a new URL of the project or another Redmine/ChiliProject host (e.g. on another domain). When redirection to another Redmine/ChiliProject is used, users can be redirected exactly to the same issue, Wiki page etc (the same URI path but on new Redmine/ChiliProject host).
The plugin gets activated, when a user archives a project (it does not effect deletion). After clicking on the “Archive” link in the project list in the Administration section the user gets forwarded to the redirection form:
This form supports the following “types” of redirection:
- “Without redirection” – the message is displayed, no redirection occurs;
- “Redirect to URL” – redirects to the specified URL;
- “Redirect to Redmine” – redirects to appropriate page on another Redmine/ChiliProject (on another host).
Unlike the “Without redirection” type two other types come with two additional fields: “URL” or “Redmine base URL” and “Delay”.
In the case, when the value for “Delay” is zero or none, that is, when you give no time for users to read the message, the plugin will use the SEO-friendly 301 HTTP status code (Moved Permanently) for the redirection.
Redirection to URL¶
In the “Redirect to URL” mode the user is redirected to the specified URL. If the “Delay” is equal to “0”, the user is redirected immediately (and the message is not shown), otherwise the page waits for the specified number of seconds (the message is shown in this case) and then redirects.
Redirection to Redmine/ChiliProject¶
In the “Redirect to Redmine” mode the user gets redirected to the same page (having the same URI path) on another Redmine/ChiliProject.
- Let’s take the URL of this page which is:
- If the field “Redmine base URL” contained e.g.:
- The new URL a user would be going to be redirected to would be:
Therefore using this type of redirection means, that the project has been transferred to another Redmine/ChiliProject host.
If the “Delay” is equal to “0”, the user is redirected immediately (and the message is not shown) otherwise a page waits for the specified number of seconds (the message is shown in this case) and then redirects.
After submitting the form the new link appears in the project list (near the “Unarchive” link):
This link opens the redirection form and allows changing redirection settings. The link will also be available for previously archived projects, even for those ones, which do not use redirection and do not have any removal message.
Check the following settings:
If the user accessed the page of the project, he/she would get:
To install the plugin do:
- For Redmine 2.x.x and above:
rake redmine:plugins:migrate RAILS_ENV=production.
- For older Redmine and ChiliProject:
rake db:migrate:plugins RAILS_ENV=production.
- Restart Redmine/ChiliProject.