Same problem - doesn’t work for friendly URLs.
I made a bit of a mod and this works however. Not perfect but better than nothing.
Create a custom error page and set that in tools | configuration
In that page make it non cacheable and call a snippet which I called redirect
The snippet redirect is as follows:
<?php
$redirect = array(
'/directory1/' =>2438,
'/directory1/index.html' =>2438
);
$referring_url = getenv("REQUEST_URI");
#echo 'Referring url = '.$referring_url.' redirecting to :'.$redirect[$referring_url];
if (isset($redirect[$referring_url])) {
$modx->sendRedirect($modx->makeUrl($redirect[$referring_url], '', '', 'full'), 0, 'REDIRECT_HEADER', '301');
}
?>
Make the array as long as you want of all the urls you wish to redirect. You can uncomment the echo and comment out the if statement to test.
I know of the limitations with the REQUEST_URI in that it is blocked by some corporate networks etc but this will get 99% of home users and plenty of others.
If you make that page a generic not found 404 with some useful links that caters for those as well.
Hope this helps.