title: Using .htaccess, mod_rewrite, and cookies to separate multiple logins?
body: <p><strong>I'm</strong> trying to figure out how to do something but I don't even know if I'm thinking in the right direction.</p>
  
  <p>The main goal is to allow multiple logins, from different accounts in the same browser. User information is being stored in cookies, and I would like to implement multiple similar cookies that are associated with different virtual directories.</p>
  
  <p>My current directory structure is simple:</p>
  
  <pre><code>/
  /scripts
  /includes
  /images
  </code></pre>
  
  <p>I only need to affect the scripts directory.</p>
  
  <p>I want a user to be able to access a virtual directory under the scripts directory, and have it see the contents of the scripts directory, but pass a cookie set to the virtual directory. So accessing <code>/scripts/username/file.php</code> actually accesses <code>/scripts/file.php</code> but passes the cookie set to <code>/scripts/username/</code></p>
  
  <p>I don't even know if this is possible. If it is possible, I'm gonna need help. :)</p>