title: mod_rewrite remapping folder
body: <p>I've currently updated our site, and the image folder name has changed from <code>/img/</code> to <code>/images/</code>.</p>
  
  <p>I'm still getting 404 errors in my apache error log from bots etc trying to access the old <code>/img</code> folder.</p>
  
  <p>I'm trying to write a mod_rewrite rule to redirect any attempts to access <code>/img/</code> to refer to <code>/images/</code>.</p>
  
  <p>This is what I've got so far:</p>
  
  <pre><code>RewriteRule ^img/?(.*)$ images/$1 [R=301,L]
  </code></pre>
  
  <p>However, whenever I access <a href="http://mysite.com/img" rel="nofollow">http://mysite.com/img</a> I still get my 404 page (instead of a forbidden page which I should receive for accessing /images).</p>
  
  <p>Is this correct? I do have another rule forcing use of ssl if that matters.</p>
  
  <p>Many thanks</p>