[solved] htaccess SetEnv
Due to the increased number of users on our web page, we have to migrate it from Apache to Litespeed. However, there is one problem: we use SetEnv commands within htaccess file in order to set some environment variables, for ex:
SetEnv USER user1
This works well in Apache, but not in Litespeed - it has no effect. We have tried lots of other commands using RewriteRules, such as:
RewriteRule ^ - [E:USER=user1]
RewriteRule . - [E:USER=user1]
RewriteRule ^(.*) [E:USER=user1]
RewriteRule ^(.*) - [E:USER=user1]
... and so on, but none of them sets the environmental variables. Obviously I do call "RewriteEngine On" before calling RewriteRule commands.
I can list all the environmental variables using phpinfo() call, but none of the entries within .htaccess sets any of the variables. I can set these directly within the php code ($_SERVER['USER'] = "user1"; ) and it works fine.
I have looked all over the internet and couldn't find a solution that works from the .htaccess. Can you advise please?
Last edited by NiteWave; 04-21-2013 at 06:32 PM..