The URL I'm using is, let's say, example.com/subdir/index.php?foo=bar
index.php contains this: <?php echo getenv("testenvvar"); ?>
I'm setting an enviroment variable in .htaccess like so:
SetEnvIf Request_URI (index) TestEnv=Worked
This prints "Worked".
If I change it to SetEnvIf Request_URI (bar) TestEnv=Worked
, it does not.
How can I do this?