This is what was the complete solution:
- , , passwordprotect, : [[passwordprotect]]. ( ):
<?php
if(isset($_SERVER['PHP_AUTH_USER']) && ($_SERVER['PHP_AUTH_USER']=='user') && ($_SERVER['PHP_AUTH_PW']=='password'))
{
echo 'You are successfully logged in.';
} else {
header('WWW-Authenticate: Basic realm="Protected area"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
}
EDIT: , , , , [[passwordprotect]], modx . : [[! Passwordprotect]] Revolution. , [! Passwordprotect!] Evolution. . , - !