I develop websites on my small local webserver, the develop server. Whenever development is completed I transfer the web site to it's live server. For that develop and also the local server some different .htaccess configurations are essential, for example:

php_value include_path ".:/Localserver/global/stuff_develop/"
php_value include_path ".:/Liveserver/global/stuff_live/"

I must possess some kind of IF statement during my htaccess that allows it to make use of the best include_path in line with the server it sits on. This causes it to be easy to transfer the .htaccess file without needing to change it out to facilitate for that server it's on. Is possible, and when yes, wouldso would I actually do this?

I already attempted experimenting with SetEnvIf which sets a _SERVER variable "local" to value "1" when we are around the local server. Could this be utilized in htaccess itself for this function?

Thanks ahead of time!

Perhaps you have attempted fixing this in PHP using ini_set('include_path', ...) ?

E.g. if your page script resides in "/Localserver/site1/pages" resp. in "/Liveserver/site3/pages" something similar to

$basepath=dirname(dirname(__FILE__));
switch ($basepath) {
    case ('/Localserver'): ini_set('include_path',...) ; break;
    case ('/Liveserver'): ini_set('include_path',...) ; break;
}