title: Apache rewrite rule to lowercase directory only
body: <p>I'm trying to make a rewrite rule that will only apply the lowercase to the directories (Not the filename)</p>
  
  <p>With the help of the apache manual, I've got this far:</p>
  
  <pre><code>RewriteEngine On
  RewriteMap lc int:tolower
  RewriteRule (.*?[A-Z]+.*) ${lc:$1}
  </code></pre>
  
  <p>But obviously this is going to apply to the whole uri. I have tried a whole lot of different regex's and RewriteConditions, but regex really gives me a headache, and was wondering if someone could help.</p>
  
  <p>Just to confirm, I'd want this:</p>
  
  <pre><code>http://www.anything.any/AnYpatH/iN/Site/FiLeNaMe.ExT
  </code></pre>
  
  <p>to rewrite to:</p>
  
  <pre><code>http://www.anything.any/anypath/in/site/FiLeNaMe.ExT
  </code></pre>