Question

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:
/var/www/site
/var/www/betasite

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.

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.
I need a virtual host setup based on the cookie in the request header. Any ideas?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top