title: htaccess RewriteRule within <if> statement using HTTP_HOST
body: <p>I run multiple sites on one server, from one .htaccess file with a custom site design that uses one page (index.php?pageid=x). Depending on the pageid it triggers different content/layouts.</p>
  <p>For each site I'm using an IF statement within .htccess, for example:</p>
  <pre><code>&lt;If &quot;%{HTTP_HOST} == 'site.com'&quot;&gt;     
  RewriteRule goes here
  &lt;/If&gt;
  </code></pre>
  <p>If I'm out of the IF statement I use a rewrite rule like this:</p>
  <pre><code>RewriteRule ^fr/cookie-policy/$ /index.php?pageid=11 [L]
  </code></pre>
  <p>The above rule works as planned, but if I use this rule within the IF statement it doesn't work. I have to remove the leading ^ and swap it for a /. But this is far from ideal as it will matches anything the ends with a designated pattern.</p>
  <p>Can anyone suggest a solution? What I'm I missing?</p>