Found what the problem was. As I expected, apache is not seeing the file .htaccess. And I did not see it because the Directive AllowOverride None. The system administrator has created multiple configuration files for apache hosts are almost the same, except the Directive. The website https://site.ru
- load one configuration file, and https://www.site.ru
on the other, in which the AllowOverride Directive is off.