title: RewriteRule for images
body: <p>I have to rewrite some url on my site. I've put this in my htaccess to make this change:
  <a href="http://example.com/john/?a=1&amp;b=2" rel="nofollow">http://example.com/john/?a=1&amp;b=2</a> --> <a href="http://example.com/index.php?account=john&amp;a=1&amp;b=2" rel="nofollow">http://example.com/index.php?account=john&amp;a=1&amp;b=2</a></p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([a-zA-Z0-9_-]+)/?$ ./index.php?account=$1 [NC,QSA,L]
  </code></pre>
  
  <p>Now I have to rewrite images url in this way. Every image with this path: <strong>example.com/john/images/a.jpg</strong></p>
  
  <p>Should point to phisical path: <strong>example.com/accounts/john/images/a.jpg</strong></p>
  
  <p>How can I do that?</p>
  
  <p>Note: "John" is not fixed but can be every possible word.</p>