title: Apache mod_rewrite craziness in inheritance
body: <p>So I have some crazy strangeness in mod_rewrites being ignored when child directories also have an htaccess file (regardless of whether the file has a conflicting rule or not).</p>
  
  <p>So example to redirect /index.html of a dir to / for canonical purposes...</p>
  
  <pre><code>RewriteCond %{THE_REQUEST} /index\.html [NC]
  RewriteRule ^(.*?)index\.html$ /$1 [L,R=301,NC,NE]
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{DOCUMENT_ROOT}/$1/index\.html -f [NC]
  RewriteRule ^(.+?)/?$ /$1/[R=301,L]
  </code></pre>
  
  <p>So... if this is set in the root settings, then everything works. But once a child directory has an htaccess of its own (even without a conflicting rewrite) it just completely ignores.</p>