title: .htaccess Set PHP Value depending on Hostname
body: <p>for our project we need to set several PHP values depending on the environment (development/production), most notably session save path and some tracing and profiling settings.</p>
  
  <p>We do not want to set them in the PHP script because due to some horrible legacy code which would require a lot of changes and we don't want to have to change the .htaccess every time before commiting it to git (but we require the .htaccess to be in source control).</p>
  
  <p>Is there any way to do something like  this in the .htaccess:</p>
  
  <pre><code>if (hostname == "dev.example.com") {
    php_value session.save_path /tmp
    [...]
  }
  </code></pre>