redirectoid 1.0.0-beta1Released Feb 11, 2013 by sepiariver
A simple snippet that redirects to any Resource specified by ID, or a random child of a specified parent(s).
Redirectoid supports various response codes described here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
It also exposes the arguments for the $modx->makeUrl() method for further customization.
Thanks for using MODx Revolution.
This version is deprecated. It is recommended to use a newer version.Download 9kb (849 downloads)
Initial beta release.
Simply call the snippet like this: [[Redirectoid]]
Requests to that page will be redirected to the site_start. Optionally provide an ID and response code:
[[Redirectoid? &id=`3` &responseCode=`307`]]
This will redirect the page with the snippet call to the Resource with ID 3, sending a Redirect Status Code of "307 Temporary Redirect".
It comes in really handy when you use Resources as slide items, or items in other listings, where you want the Resource to be published, but don't really want people visiting the Resource directly. Just add this snippet to the content field or perhaps a blank "Item Template" with a redirect to the parent ID that actually displays the styled content, like this:
Tested in 2.2.6 but should work in any version that includes the modX.sendRedirect class.