title: www RewriteRule not applying to subdirectories with other RewriteRules
body: <p>I have an .htaccess file in my root folder to redirect non-www accesses to www</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_HOST} ^example.com$
  RewriteRule .* https://www.example.com/$0 [L,R=301]
  </code></pre>
  
  <p>The rule works fine, but in a subdirectory (call it <code>/sub</code>) where I have another <code>.htaccess</code> file with rewrite rules - the www rule is not applied. </p>
  
  <p>Of course I can copy paste it - but that is obviously not the best solution.</p>
  
  <p>I've tries adding <code>RewriteOptions Inherit</code> to the subdirectory's <code>.htacces</code> - and the rule works, but the rules works in relation to the sub folder and not the sub folder so <em><a href="http://example.com/sub/something.html" rel="nofollow">http://example.com/sub/something.html</a></em> is redirected to <em><a href="https://www.example.com/something.html" rel="nofollow">https://www.example.com/something.html</a></em> (removing the <code>sub</code> folder from the path)</p>
  
  <p>Setting <code>RewriteBase /</code> in the subdirectory's htaccess isn't good as well - since it interferes the other rules I have in the file</p>
  
  <p>I'd really appreciate your help</p>