plone / plone.app.redirector

Redirects to moved content after accessing old URLs
https://pypi.python.org/pypi/plone.app.redirector
4 stars 4 forks source link

Introduction

by Martin Aspeli optilude@gmx.net based on work by Helge Tesdal (RedirectionTool) and Whit Morriss (topp.rose).

Bring dead links back to life! plone.app.redirector knows where your content used to be and can bring you to its new location when content moves.

This component expects you to register storage.RedirectionStorage as a local utility providing IRedirectionStorage (CMFPlone does this). Once that's done, the subscribers in subscribers.py will listen for object moved and object deleted events.

When an object is moved (renamed or cut/pasted into a different location), the redirection storage will remember the old path. It is smart enough to deal with transitive references (if we have a -> b and then add b -> c, it is replaced by a reference a -> c) and circular references (attempting to add a -> a does nothing).

When an object is deleted, all references to it are deleted as well.

The view in browser.py contains methods (used in Plone's default_error_message.pt when it gets a NotFound error) that do the following: