I've found one intresting detail about MODX:
Any nonexistent page returns php header 404, but the exact URI of error_page 404 MODX resource returns code: 200 OK. You can test it by yourself with
http://www.bertal.ru/
It means, if you do hard redirect to 404 page in MODX you'll have such queue of headers:
HTTP/1.1 301 Moved Permanently (or HTTP/1.1 302 Moved Temporary)
Location: /error_page/
HTTP/1.1 200 OK
Thats very bad for SEO.
So... I solved it this way:
1) Created new template "404" for pages always hard redirect to 404
2) Created snippet "generate404" with code
$uri404='/404/'; // NONEXISTENT PAGE URI
if($_SERVER['REQUEST_URI'] != $uri404) header("Location: $uri404", TRUE, 301);
3) put the [[!generate404]] call in begining of my new template "404"
Result:
HTTP/1.1 301 Moved Permanently
Location: /404/
HTTP/1.1 404 Not Found
Not very beautiful, but it works...