title: Understanding Apache RewriteMap with RewriteLock
body: <p>I've taken over development of a fairly heavy-duty LAMP application. The original dev used an .htaccess file with RewriteMap and a PHP script to handle certain conditions of the app.</p>
  
  <p>Specifically, when certain subdomain patterns are requested by the client, the RewriteMap catches them and sends them to the appropriate application module.</p>
  
  <p>I'm quite comfortable with typical mod_rewrite redirects, and I think I've got the basic RewriteMap concept figured out; but I'm struggling to find decent documentation on how RewriteLock works. According to the Apache docs:</p>
  
  <blockquote>
    <p>This directive sets the filename for a synchronization lockfile which mod_rewrite needs to communicate with RewriteMap programs. Set this lockfile to a local path (not on a NFS-mounted device) when you want to use a rewriting map-program. It is not required for other types of rewriting maps.</p>
  </blockquote>
  
  <p>But this is still a little vague for me. Whats the exact purpose and function of RewriteLock and how does it work?</p>