Attempted trying to find this but my google-fu is missing today.

And So I have 2 versions of site, in

/var/www/vhosts/testa.mydomain.com/httpdocs and 
/var/www/vhosts/testb.mydomain.com/httpdocs

where each documentroot is virtually an entire site overhaul, and I wish to perform a/B (multivariate) testing to determine what site works better.

Searching a week ago I saw suggestions on doing this time around based (even &lifier odd seconds), but since the website is a gift basket site (or possibly a basket-situation!), I'd rather not flit between 2 different processing situations mid-transaction.

And So I thought it might be good for everyone from testa if client ip last octet being, and from testb if last octet was odd. We're able to then a minimum of gain some metrics on the number of people abandoned the basket as too unwieldy in various versions from the site.

I am confident that a lot of RewriteCond lines according to % is going to do it, but I am pretty hopless at mod_rewrite.

customers would visit test.mydomain.com, and become should offered from either DocumentRoot's evenly, not seeing testa or testb within their url, but we're able to log each variant's performance.

Any kindly guru's in a position to advise ?

TIA David

Update: I'm able to setup testa.mydomain and testb.mydomain as subdomains via virtual hosts in the event that would help any.

Option 1 (Redirects) add one of these simple to both domain names

Put on even number site (testb.mydomain.com)

RewriteEngine On
RewriteCond %{REMOTE_ADDR} [13579]$
RewriteRule .* http://testa.mydomain.com/$1 [R=301,L]

Put on odd number site (testa.mydomain.com)

RewriteEngine On
RewriteCond %{REMOTE_ADDR} [02468]$
RewriteRule .* http://testb.mydomain.com/$1 [R=301,L]

Option 2 (subfolders NOT subdomains)

RewriteEngine On
#direct to EVEN SITE
RewriteCond %{REMOTE_ADDR} [02468]$
RewriteRule (.*) /testa.mydomain.com/$1 [L]

#direct to ODD SITE
RewriteCond %{REMOTE_ADDR} [13579]$
RewriteRule (.*) /testb.mydomain.com/$1 [L]

Perhaps you have attempted the burden balancer?

You are able to setup load balancing rules using the file rules.xml or using code (Rule and RuleChain). There must be a good example system in /balancer, which demonstrates how to create rules.

See also

http://tomcat.apache.org/tomcat-5.5-doc/balancer-howto.html#Sample_Configuration

http://onjava.com/pub/a/onjava/2004/03/31/clustering.html