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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > Rewrite broken

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2008, 01:42 PM
justme justme is offline
Member
 
Join Date: Feb 2008
Posts: 35
Cool Rewrite broken

Hello,
after upgrading to LSWS 3.3.18 (from 3.3.15) on linux 32bit,
the following rewrite rules used on Joomla stopped working:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ / [F,L]

Actually no 404 but going back to the homepage so it may have to do with some variables not being defined as with the previous version?
Anyway I removed the 3.3.15 from the version management a bit too fast, how I can put it back to revert and see how it helps?
Thanks.
Reply With Quote
  #2  
Old 09-10-2008, 02:33 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Can you turn on RewriteLog and check the error.log?

Actually, there is a change in 3.3.17 which affect PHP environment variables, PHP_SELF, SCRIPT_NAME. It should not affect rewrite rules.
Reply With Quote
  #3  
Old 09-10-2008, 02:50 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
litespeedtech.com has been on 3.3.18, our joomla installation still works.
Reply With Quote
  #4  
Old 09-10-2008, 02:52 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Check lsws/autoupdate/ fold see if the 3.3.15 package is still there. It is available on our web site as well.
Reply With Quote
  #5  
Old 09-10-2008, 10:51 PM
justme justme is offline
Member
 
Join Date: Feb 2008
Posts: 35
The 3.3.15 folder is still there but not showing on the version manager (kind of normal since I had clicked on remove).
Joomla is being used with the 404Sef SEO url optimization module, turning it off solves the problem.
[REWRITE] Rule: Match '/100-laine-vierge' with pattern '(.*)', result: 2
[REWRITE] Cond: Match '/100-laine-vierge' with pattern '^(/component/option,com)', result: -1
[REWRITE] Cond: Match '/100-laine-vierge' with pattern '(/|\.htm|\.php|\.html|/[^.]*)$', result: 2
[REWRITE] stat( /home/www/xyz.com/laine/100-laine-vierge ) failed
[REWRITE] stat( /home/www/xyz.com/laine/100-laine-vierge ) failed
[REWRITE] Source URI: '/100-laine-vierge' => Result URI: '/'
[REWRITE] Rule: Match '/' with pattern '^(.*)$', result: 2
[REWRITE] Cond: Match '' with pattern 'mosConfig_[a-zA-Z_]{1,21}(=|\%3D)', result: -1
[REWRITE] Cond: Match '' with pattern 'base64_encode.*\(.*\)', result: -1
[REWRITE] Cond: Match '' with pattern '(\<|%3C).*script.*(\>|%3E)', result: -1
[REWRITE] Cond: Match '' with pattern 'GLOBALS(=|\[|\%[0-9A-Z]{0,2})', result: -1
[REWRITE] Cond: Match '' with pattern '_REQUEST(=|\[|\%[0-9A-Z]{0,2})', result: -1
[REWRITE] Rule: Match '/' with pattern '(.*)', result: 2
[REWRITE] Cond: Match '/' with pattern '^(/component/option,com)', result: -1
[REWRITE] Cond: Match '/' with pattern '(/|\.htm|\.php|\.html|/[^.]*)$', result: 2
[REWRITE] Cond: test '/home/www/xyz.com/laine' with pattern '-f', result: 1
[REWRITE] Cond: test '/home/www/xyz.com/laine' with pattern '-d', result: 0
[REWRITE] Rule: Match '/' with pattern '^(.*)$', result: 2
[REWRITE] Cond: Match '' with pattern 'mosConfig_[a-zA-Z_]{1,21}(=|\%3D)', result: -1
[REWRITE] Cond: Match '' with pattern 'base64_encode.*\(.*\)', result: -1
[REWRITE] Cond: Match '' with pattern '(\<|%3C).*script.*(\>|%3E)', result: -1
[REWRITE] Cond: Match '' with pattern 'GLOBALS(=|\[|\%[0-9A-Z]{0,2})', result: -1
[REWRITE] Cond: Match '' with pattern '_REQUEST(=|\[|\%[0-9A-Z]{0,2})', result: -1

thanks again for looking into this.
Reply With Quote
  #6  
Old 09-11-2008, 07:51 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
The execution of the rewrite looks correct. When result is 1 or 2, means the pattern has been matched.
/100-laine-vierge was rewritten to "/".

Have you configured those rewrite rules at vhost level? It will affect some PHP _SERVER[] variables as we made some change to match Apache's behavior.

If you prefer not using .htaccess, you can create a "/" static context and configure rewrite rules there.
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 11:11 PM.



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