All the provided solutions didn't work for me. I figured following directives do the trick:
SetEnvIf Request_URI ^/page-url auth=1AuthName "Please login"AuthType BasicAuthUserFile "/www/live.example.com/files/html/.htpasswd"# first, allow everybodyOrder Allow,DenySatisfy anyAllow from allRequire valid-user# then, deny only if requiredDeny from env=auth