tags:

views:

5

answers:

0

I'm trying to write an .htaccess file that will be placed on a number of different sites, and I don't want to have to change the domain in the session.save_path for each site. I'm trying to use the %{HTTP_HOST} variable but it's not working.

The paths to the session storage folders on the server look like this:

/var/foo/vhosts/siteone.com/httpdocs/session/
/var/foo/vhosts/sitetwo.com/httpdocs/session/

So I'm trying to make this work dynamically, regardless of domain name. Here's what I've got that doesn't work:

php_value session.save_path /var/foo/vhosts/%{HTTP_HOST}/httpdocs/session

What am I doing wrong?