This plugin seems really helpful - thanks almays!

Now if I could only get it to actually redirect and not show my 404 page...
Below is what I did using MODx 0.9.6.1 - am I missing something?
- Copied the plugin code here and then clicked to on New plugin in MODx.
- Added the name Legacy Redirector into the Plugin name field
- Added a description to the Description field
- Pasted the code into the Plugin code textarea
- Locked the plugin for admin editing only
- Clicked the Configuration tab and selected a category for the new plugin
- Clicked the System Events tab and checked the box for OnPageNotFound
- Saved the plugin
- Clicked the Template Variables tab and then the New Template Variable link
- Entered the text oldURI into the Variable Name field
- Added a caption and a description into the corresponding fields
- Checked the boxes for the templates I wanted to have access to the new variable
- Saved the new Template Variable
- Opened a page that has an older page URI I want redirected to it
- Scrolled down to the field for the new Template Variable
- Entered the text /oldname.html into the field
- Saved the page
- Entered the text http://domain.com/oldname.html into my browser to test the redirect
- Result: my 404 page :’(
UPDATE:
I just checked my System Events, and I’m getting the following error from the Legacy Redirector plugin:
parse error, unexpected '<'
Parse error: parse error, unexpected '<' in /home/content/p/o/m/pomassage/html/manager/includes/document.parser.class.inc.php(745) : eval()'d code on line 1
So, I simply deleted the
from the plugin code supplied by Alexey above, and all is working as expected.