skip to navigation
skip to content

collective.scriptedredirect 1.0

Python scripted redirects in Plone CMS

Latest Version: 1.1.1


collective.scriptedredirect allows you to write HTTP 302 Moved Temporary and HTTP 301 Moved Permanently logic for your Plone CMS site with Python scripting.


  • The redirect logic is front-end web server independent (no need to learn Apache, Varnish or Nginx)
  • Python allows to write more complex logic for redirects easier (no regular expressions!)
  • Python scripts in Plone have access to more complete state information (user logged in status, permissions, etc.)


Add add-on in buildout.cfg:

eggs =

Run buildout.

Install Scripted redirects in Python in Site Setup > Add-ons.

Edit redirect_handler in Zope Management Interface.

In the case of accident use ?no_redirect HTTP query parameter to override the redirecter and fix your site.


The redirect script takes input parameters

  • url: full URL of the request
  • host:
  • port: 80, 443 or custom Zope port
  • path: the path part of URL


collective.scriptedredirect hooks itself to Zope’s pre-traversal hook and is triggered before the request traverses into your Plone site in Zope application server.


Mikko Ohtamaa Changelog =========

1.0 (2013-02-05)

  • Initial development [miohtama]
File Type Py Version Uploaded on Size (md5) Source 2013-02-05 25KB