Can't seem to password protect sub domain using htaccess
<p>We have our main website: www.example.com.</p>

<p>A partner has created a website: subdomain.theirexample.com and they have pointed it at our IP address.</p>

<p>We want to password protect any traffic coming through on the subdomain whilst leave the original domain open to the public. I've tried adding the below at the top of our htaccess file but we're not getting a password prompt:</p>

<pre><code>SetEnvIf Host ^subdomain\.theirexample\.com$ passreq
AuthType Basic
AuthName "Password Required"
AuthUserFile /home/example/.htpasswd-theirexample
Require valid-user
Require all granted
Deny from env=passreq
Satisfy any
</code></pre>

<p>I also tried it simply like:</p>

<pre><code>SetEnvIf Host subdomain.theirexample.com passreq
</code></pre>