I am trying to use a .htaccess file to setup specific behaviors for one directory.My .htaccess is as follows:ErrorDocument 401 /var/www/secret/logging.phpAuthName My Password Protected SiteAuthUserFile /var/www/secret/.htpasswdAuthType BasicRequire valid-user# Set REMOTE_USER env variable on 401 ErrorDocumentRewriteEngine OnRewriteBase /secret/RewriteCond %{ENV:REDIRECT_STATUS} ^401$RewriteRule .* - [E=REMOTE_USER:%{ENV:REDIRECT_REMOTE_USER}]However, when attempting to test this, the Apache default error page states a 404 was encountered while trying to use an ErrorDocument to handle the request. All permissions are correct, all filepaths are correct.What am I doing wrong?
ErrorDocument not working with .htaccess file
apache httpd