![]() |
Setting environment variables in .htaccess
It seems environment variables don't work as expected on LiteSpeed and aren't compatible with the way Apache does things.
I have this, which works on Apache: Code:
SetEnvIf Request_URI "^/path/to/admin.*$" adminUriCode:
RewriteRule ^/path/to/admin - [E=AppDisablePasswordProtect:1]Code:
RewriteRule (.*) - [E=FOO:BAR]PHP Code:
|
Adding Env should be working in LSWS. You can enable rewrite logging to verify by adding 'RewriteLogLevel 9' in httpd.conf and look for [REWRITE] entries in error_log.
However, the added env would not reflect in $_ENV but $_SERVER. For your case, a workaround is to create .htaccess in folder /path/to/admin to allow access: Quote:
|
| All times are GMT -7. The time now is 08:15 PM. |