SetEnv alternative

Gerry

Active Member
#1
Since LSWS doesn't seem to support the SetEnv directive, I tried using RewriteRules to achieve the same result. However, it doesn't seem to work:

Code:
#
# FLOW3 context setting
#

# Enable URL rewriting
RewriteEngine On

# Set flag so we know URL rewriting is available
#SetEnv FLOW3_REWRITEURLS 1

# You will have to enable the following option and change the path if you
# experience problems while your installation is located in a subdirectory
# of the website root.
RewriteBase /

# Stop rewrite processing if it is useless
RewriteRule ^(Resources/|robots\.txt|favicon\.ico) - [L]

# Continue only if the file/symlink/directory does not exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*) index.php/$1 - [E=FLOW3_CONTEXT:Development,E=FLOW3_ROOTPATH:/web/test/xxx.tld/flow,E=FLOW3_REWRITEURLS:1]

ErrorDocument 500 "<h1>Application Error</h1><p>The FLOW3 application could not be launched.</p>"
 

mistwang

LiteSpeed Staff
#4
Well, the rewrite rule wont execute for phpinfo.php, try add a rule like

Code:
RewriteRule . - [E=FLOW3_CONTEXT:Development]
at the beginning of .htaccess
 

Gerry

Active Member
#5
You're right, unfortunately it still doesn't work. Is there something we might need to enable in LiteSpeed to make it work?

I've set up a completely empty virtualhost at http://gerry.isol.be/phpinfo.php with the following .htaccess:

Code:
RewriteEngine On
RewriteRule . - [E=FLOW3_CONTEXT:Development]
 
Top