Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Blog / collective.redirect

collective.redirect

by Ross Patterson last modified Nov 12, 2008 05:56 AM
Administer redirects to internal or external URLs using Link like content

Administer redirects to internal or external URLs using Link like content. Where Products.redirectiontool or plone.app.redirector only deal with redirecting to internal URLs internal to the portal, collective.redirect allows for redirecting to external URLs. The paths to redirect are administered using instances of the Redirect content type. The paths that are redirected are independent of the path of the Redirect instance for a couple of reasons.

Firstly, since the portal object is not a BTree based folder it will begin to behave poorly if too many objects are added to it. Allowing the redirected paths independent from the location of the Redirect instances allows for many redirects without putting too many objects in the portal root.

Secondly, having the paths independent of the Redirect instance locations allows users to create redirect for paths that they can't add content too. Keep in mind that this might be a bad thing for your site and can certainly be abused as a DOS attack of sorts.

If multiple redirects exist for the same path, the one with the more recent publication date will be preferred. Finally a redirect will never override an otherwise traversable URL. IOW, a redirect cannot override an actual content object, skin object, view, or anything else traversal. The redirect only occurs when a NotFound error would otherwise be raised.

Navigation
OpenID Login

Contact

me@rpatterson.net

IRC: zenwryly@irc.freenode.net
plone.org: rossp
GTalk: mer@patterson.net
Yahoo IM: patterson_ross
AIM: rosspatters
MSN: me@rpatterson.net
Skype: merpattersonnet

PO Box 7775 #10587
San Francisco, CA
94120-7775

Phone
+1 (415) 894-5323