I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

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).

Using

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:

Without redirection type

Available redirect types

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

Redirect to URL type

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.

It’s recommended to set the “Delay” to zero to let the plugin use the SEO-friendly 301 HTTP status code (Moved Permanently) for the redirection.

Redirection to Redmine/ChiliProject

Redirect to Redmine type

In the “Redirect to Redmine” mode the user gets redirected to the same page (having the same URI path) on another Redmine/ChiliProject.

For example:

  • Let’s take the URL of this page which is: http://projects.andriylesyuk.com/projects/project-removal/wiki.
  • If the field “Redmine base URL” contained e.g.: http://another.host.com/redmine.
  • The new URL a user would be going to be redirected to would be: http://another.host.com/redmine/projects/redmine-removal/wiki.

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.

It’s recommended to set the “Delay” to zero to let the plugin use the SEO-friendly 301 HTTP status code (Moved Permanently) for the redirection.

Changing settings

Redirect link in projects listing

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.

Sample screenshots

Check the following settings:

Test configuration

If the user accessed the page of the project, he/she would get:

Screen for test project

Install

To install the plugin do:

  • For Redmine 2.x.x and above:
    • Copy project_removal directory to #{RAILS_ROOT}/plugins.
    • Run: rake redmine:plugins:migrate RAILS_ENV=production.
  • For older Redmine and ChiliProject:
    • Copy project_removal directory to #{RAILS_ROOT}/vendor/plugins.
    • Run: rake db:migrate:plugins RAILS_ENV=production.
  • Restart Redmine/ChiliProject.

test-message.png View - Screen for test project (40.1 KB) Andriy Lesyuk, 29 Sep 2011 18:20

without-redirection.png View - "Without redirection" type (21.6 KB) Andriy Lesyuk, 29 Sep 2011 18:20

redirect-to-redmine.png View - "Redirect to Redmine" type (45 KB) Andriy Lesyuk, 29 Sep 2011 18:20

redirect-to-url.png View - "Redirect to URL" type (58 KB) Andriy Lesyuk, 29 Sep 2011 18:20

redirect-types.png View - Available redirect types (14.6 KB) Andriy Lesyuk, 29 Sep 2011 18:20

test-config.png View - Test configuration (64.9 KB) Andriy Lesyuk, 29 Sep 2011 18:20

redirect-link.png View - "Redirect" link in projects listing (1.32 KB) Andriy Lesyuk, 30 Sep 2011 11:04

Terms of use | Privacy policy