title: .htaccess rewrite rule for anything except specific http_host
body: <h2>Context of the problem:</h2>
  <p>I'm using shared hosting via cPanel, and on my current hosting setup I don't have the ability to create additional virtual hosts. Presently to keep costs down I am trying to avoid more complexity, so I have several sites symlinked in to public_html</p>
  <pre><code> public_html /
   |
   |---&gt; siteone.net /
   |
   |---&gt; sitetwo.com /
   |
   |---&gt; sitethree.net.au /
   |
   |--  (etc)
  </code></pre>
  <p>.</p>
  <h2>The Problem:</h2>
  <p>'sitetwo.com' is accessible from siteone.net as <a href="http://siteone.net/sitetwo.com/" rel="nofollow noreferrer">http://siteone.net/sitetwo.com/</a></p>
  <p>.</p>
  <h2>Aim for Solution:</h2>
  <p>My goal is to prevent access to the site folders for the other sites. I'm only simulating virtual hosts which is clearly not ideal, but I need to do it for a few more months.</p>
  <p><em>NB: Currently domains are routed using htaccess code as follows:</em></p>
  <pre><code> RewriteCond %{HTTP_HOST} ^(www.)?siteone.net$
   RewriteCond %{REQUEST_URI} !^/siteone/
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ /siteone/$1
   RewriteCond %{HTTP_HOST} ^(www.)?siteone.net$
   RewriteRule ^(/)?$ siteone/index.php [L]
  </code></pre>
  <p>.</p>
  <h2>Attempted Solution:</h2>
  <p>My aim was to redirect anything that was not routed via siteone.com one to 404:</p>
  <pre><code> RewriteCond %{HTTP_HOST} !^(www.)?siteone.net$
   RewriteCond %{REQUEST_URI} ^/siteone.net/
   RewriteRule -- serve 404 page ----- [L]
  </code></pre>
  <p>This did not work.  The mod_rewrite manual and google don't seem to think that NOT logic is available against HTTP_HOST in a rewrite condition...  or else I'm not reading it right.</p>
  <p>Any assistance will be gratefully received.</p>