Quick Tip: Split Testing with Apache

You don't need a powerful tool like Google Optimize for simple URL split tests; you can also implement a split test with Apache using .htaccess. The following code snippet distributes visitors from the two pages https://vielhuber.de/test1.php (Variant 1) and https://vielhuber.de/test2.php (Variant 2) evenly between both versions. The randomization is based on the current server time.


4ab46765cc5456fb96ad18db79dcfaaa

Returning visitors always see the website last viewed (via session cookie). The concept can easily be expanded to include several variants or a central URL that is distributed to sub-pages.

Back