title: htaccess does not redirect primary URI
body: <p>I have two WordPress installation</p>
  
  <pre><code>example -&gt; contains installation for example.com
  |_ blog -&gt; contains installation for example.com/blog
  </code></pre>
  
  <p><code>blog</code> is a directory inside <code>example</code> which already has a WordPress installation. this works fine. I now wanted to redirect users visiting without www (example : <a href="http://example.com/blog/some-topic" rel="nofollow">http://example.com/blog/some-topic</a> to <a href="http://www.example.com/blog/some-topic" rel="nofollow">http://www.example.com/blog/some-topic</a>) hence i added following wild card rule .htaccess redirection rule inside of blog directory, find below content of .htaccess of blog directory</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /blog/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /blog/index.php [L]
  &lt;/IfModule&gt;
  
  RewriteEngine On
  RewriteCond %{HTTP_HOST} !^www\.
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  
  # END WordPress
  
  # Wordfence WAF
  &lt;Files ".user.ini"&gt;
  &lt;IfModule mod_authz_core.c&gt;
      Require all denied
  &lt;/IfModule&gt;
  &lt;IfModule !mod_authz_core.c&gt;
      Order deny,allow
      Deny from all
  &lt;/IfModule&gt;
  &lt;/Files&gt;
  
  # END Wordfence WAF
  </code></pre>
  
  <p>It redirects correctly for all URI which contains topic like</p>
  
  <ul>
  <li>example.com/blog/some-topic is redirected to www.example.com/blog/some-topic</li>
  <li>example.com/blog/new-topic is redirected to www.example.com/blog/new-topic</li>
  </ul>
  
  <p>And so on... my issue is when i try redirecting just the example.com/blog it redirects me back to www.example.com, what am i missing here ?</p>
  
  <p>Thanks.</p>