just a note. if you need to password protect a directory and add SSL / HTTPS support you need to put the protection code FIRST in your .htaccess file. when i had it after the https force it wouldn’t work.

AuthType Basic
AuthUserFile /var/www/vhosts/YourDomain.com/httpdocs/YourDirectory/.htpasswd
require valid-user

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} YourDirectory
RewriteRule ^(.*)$ https://YourDomain.com/YourDirectory/$1 [R,L]