We're in the process of making our site search engine friendly. We were told not to append PHPSESSID to our links. So what we want to do is disable session.use_trans_id when we are being crawled by google for example. We are using PHP 4.3, which doesn't allow this configuration setting to be changed by using the function ini_set(). Adding php_flag sesssion.use_trans_id 0 in .htaccess works, but we need this directive to only be read in based on the user agent. I can successfully set an env variable in .htaccess, but can't use it as the value for sesssion.use_trans_id. Is there any other way to achieve what we're trying to do?