Skip to main content

Addon for plone.app.redirector concerning regex redirector

Project description

Introduction

collective.regexredirector extends the plone.app.redirector behavior to allow to define redirections using regular expressions.

It might be particulary useful if you migrate an old website and you want to map old urls to the new site structure.

Note: when a 404 occurs, collective.regexredirector first calls plone.app.redirector, and if it does not redirect, then collective.regexredirector tries to match one of its registered regular expressions.

Usage

In the Plone control panel, go to the “RegexRedirector” control panel and enter your redirection rules.

One redirection by line using the following format

'old_url'='new_url'
'old_url2'='new_url2'

Examples

Redirecting all urls like /news/something to /archives/index

'/news/.*'='/archives/index'

Redirecting all urls like /tags/something to /category/something

'/tags/(?P<category_name>.+)'='/category/\g<category_name>/view'

INSTALL

Add collective.regexredirector to your buildout eggs.

Credits

Companies

makinacom

Authors

Changelog

0.2.2 (2015-05-12)

  • Supports redirection to url containing a querystring

  • Fix bug if rules contain ‘=’

0.2.1 (2013-03-28)

  • Fix egg (missing /docs)

0.2 (2013-03-28)

  • Fix egg (missing README.rst)

0.1 (2013-01-30)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.regexredirector-0.2.2.zip (22.7 kB view details)

Uploaded Source

File details

Details for the file collective.regexredirector-0.2.2.zip.

File metadata

File hashes

Hashes for collective.regexredirector-0.2.2.zip
Algorithm Hash digest
SHA256 f9cd8d4782a59723db2075f1eacfd68aaeda2660f881b28ab33b9a4ddf79ea7a
MD5 9fe12a1d1dcd042f5cb80a432f19a691
BLAKE2b-256 be641460af6e7ce9054f52af1ee677b96eeaa01e702c8c9a0841da64872fa6f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page