Password Protected Directory

# .htaccess file in the directory you want to protect, the first line prevents wordpress 404 page:

ErrorDocument 401 default
AuthUserFile /home/sitename/.htpasswds/.htpasswd
AuthType Basic
AuthName "Restricted Area"
Require valid-user

Redirect site to subfolder

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?hyptx.com$
RewriteRule ^(/)?$ subfolder/Home.html [L]