Forum Moderators: phranque

Message Too Old, No Replies

Conditional SetEnv

set environment variable if value doesn't exist

         

davidma7685

6:26 pm on Feb 20, 2010 (gmt 0)

10+ Year Member



Thanks in advance for any help anyone can provide.

Is it possible to check for the existence of an environment variable before setting a new one? And only setting the new one if it hasn't already been set?

I'm a programmer, and I have an apache set up at home, and my project uses an htaccess file to set the env. I'm setting my own in my vhost file, and I want to modify the htaccess to check for this value, and only set its own if the server hasn't set one.

I'm pretty new to htaccess syntax.

Thanks!

davidma7685

7:11 pm on Feb 20, 2010 (gmt 0)

10+ Year Member



I actually found the solution with a little more aggressive googling. For anyone who's interested, I posted the solution on my company blog.

<snip>

[edited by: jdMorgan at 2:38 am (utc) on Feb 22, 2010]
[edit reason] Sorry, no links. See TOS and Charter. [/edit]