LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > SetEnv alternative

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2009, 09:15 AM
Gerry Gerry is offline
Member
 
Join Date: Feb 2008
Posts: 29
Default SetEnv alternative

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>"
Reply With Quote
  #2  
Old 10-21-2009, 08:57 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
It should work, you can check a phpinfo() page.
Reply With Quote
  #3  
Old 10-22-2009, 02:28 AM
Gerry Gerry is offline
Member
 
Join Date: Feb 2008
Posts: 29
It doesn't work, the following is a phpinfo() where the aforementioned .htaccess is set: http://flow.d2d.be/phpinfo.php
Reply With Quote
  #4  
Old 10-22-2009, 10:34 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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
Reply With Quote
  #5  
Old 10-22-2009, 02:23 PM
Gerry Gerry is offline
Member
 
Join Date: Feb 2008
Posts: 29
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]
Reply With Quote
  #6  
Old 10-22-2009, 03:47 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
It is in the "_SERVER[]" arrary, you wont see it in "Environment" list.
Reply With Quote
  #7  
Old 10-22-2009, 11:47 PM
Gerry Gerry is offline
Member
 
Join Date: Feb 2008
Posts: 29
Gah, of course, stupid me. Thank you!
Would you know why they are not visible in the environment list?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:59 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.