title: A different document root for beta users?
body: <p>I have a wordpress based php application running on apache on ubuntu server. I have developed a new version of the application, and I'd like only certain users to access this beta. 
  My server's structure is like this:<br>
  /var/www/site<br>
  /var/www/betasite   </p>
  
  <p>I don't want these users to run the site of a different domain/subdomain. Both the sites are supposed to run off the same wordpress database and hence need the same domain. Changing the wordpress theme based on the session/cookie is also not a possibility because I have a lot of assets/plugins which are outside the wp-content/themes folder.  </p>
  
  <p>I was thinking of giving beta users a cookie, and redirect requests with those cookies to the new document root. I have been trying to mess around with htaccess's mod_rewrite, but after a lot of experimentation, I figured that mod_rewrite cannot redirect to stuff outside apache's document root.<br>
  I need a virtual host setup based on the cookie in the request header. Any ideas?</p>