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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > Rewrite Engine does not pick up correct REQUEST_FILENAME when using PATH_INFO

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2007, 10:39 AM
dreamscape dreamscape is offline
Member
 
Join Date: Oct 2006
Posts: 28
Default Rewrite Engine does not pick up correct REQUEST_FILENAME when using PATH_INFO

There is an odd problem in LiteSpeed 3.

When using the Rewrite Engine, the REQUEST_FILENAME doesn't appear to be correctly set when using urls that have PATH_INFO.

For example, the following Rewrite Rules worked fine on earlier versions of LiteSpeed, and they also work fine on other servers such as Apache and Lighttpd:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index\.php/$1 [L,QSA]
However, on LiteSpeed 3, it results in an infinite redirect (and throws a 500 error), because instead of being set to "index.php", the REQUEST_FILENAME is being set to "index.php" + the PATH_INFO.

For now I have done the following which allows the rule to work on LiteSpeed 3:
Code:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index\.php
RewriteRule ^(.+)$ index\.php/$1 [L,QSA]
Reply With Quote
  #2  
Old 04-18-2007, 11:15 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
The rewrite engine in LiteSpeed 3 has been changed a little bit to match the behavior of Apache's. We will investigate.
Reply With Quote
  #3  
Old 04-18-2007, 08:42 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
This problem should be fixed in 3.0.3
Reply With Quote
  #4  
Old 04-19-2007, 05:44 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
3.0.3 is available now.
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 10:39 AM.



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