I have the following line in my .htaccess file to select which version of PHP to use:
AddType x-httpd-php53 .php
This works great
With Apache 2.4, it is easy with / directives (on %{HTTP_HOST}?).
# configuration for foo
# default configuration
For Apache 2.2 and earlier, I would add a parameter to the startup command line of Apache (-D option) in one of the two environments then test if it is present or not via .
To do this on Windows, with Apache started as a service, modify key registry HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Apache2.
by appending -DFOO. Then, you can write:
# configuration for foo
# default configuration