This project is not covered by Drupal’s security advisory policy.

Keeps an audit log of every redirect that is added, changed or deleted, with a required note that explains why. When someone asks "who made this redirect, and why?", the answer is one click away.

Screenshot

Features

The Redirect module tells you what a redirect does, but not who created it, when it changed, or why. Redirects Log fills that gap, which helps teams with several editors, or with SEO work where redirects are added in bulk.

  • Logs every create, update and delete of a redirect, with the date, the user, the redirect's values at that moment and a note.
  • Adds a required note field to the redirect add/edit form, the delete confirmation form, and the bulk delete confirmation form.
  • Records the origin of each event: a form, a CSV import, or the system (for example a redirect created by code).
  • Overview page with the whole log, newest first, with colour-coded Created / Updated / Deleted labels that work with any admin theme.
  • Page per redirect with every event for that redirect, from newest to oldest. For updates it lists exactly which fields changed (source, destination, language, status code, enabled).
  • The history stays available after a redirect is deleted, so you can still see who removed it and why.
  • Adds a "Log" link to the operations dropdown of each redirect that has log entries, and a Log link on the redirect edit page.
  • A settings page to clean up the log entries of deleted redirects, or to delete the whole log.
  • Two permissions, so you decide which roles can read the log and which can delete it.
  • Optional support for Path Redirect Import: one note is requested for the whole CSV import and saved with every redirect the import touches.

Post-Installation

  1. Install and enable the module. It creates one database table and needs no other setup.
  2. Go to Configuration > Search and metadata > URL redirects (/admin/config/search/redirect). Add, edit or delete a redirect: the form now has a required note field.
  3. Open the Log tab on that page (/admin/config/search/redirect/log) to see all events. Use "View log" on a row, or /admin/config/search/redirect/log/[redirect ID], to see the history of one redirect.
  4. Open Settings from the log page (/admin/config/search/redirect/log/settings). It shows how many entries the log has, and has two buttons, each with a confirmation step:
    • Clean up logs of deleted redirects removes only the entries of redirects that no longer exist. The history of redirects that still exist is kept.
    • Delete all logs empties the whole log. The redirects themselves are not touched.

Neither action can be undone. Go to People > Permissions to give the module's two permissions to the roles that need them:

  • View the redirects log: see the log overview, the log of each redirect, and the "Log" links.
  • Administer the redirects log: open the settings page and delete log entries. This permission is marked "restrict access", so give it only to trusted roles.

Only changes made after the module is installed are logged, so redirects that already exist have no history until they are next changed. Uninstalling the module drops the log table.

Additional Requirements

  • Path Redirect Import: import redirects from CSV. When it is enabled, Redirects Log asks for a note on the import form and logs each imported redirect. Without it, the module works normally.

Similar projects

  • Redirect itself does not keep a history of changes to redirects. Redirects Log is an add-on to it, not a replacement.
  • Redirect 404 (a Redirect submodule) and Drupal's log (watchdog) record missing pages and general system events. They do not record who changed a redirect or why.

Supporting this Module

Bug reports, patches and feature requests are welcome in the issue queue.

Community Documentation

The module is small, and the pages above describe its screens. A longer guide can go in the README.

Supporting organizations: 

Project information

Releases