[Resolved]HTAccess rewrite errors in LSAPI logs

#1
Hi,
I have the following rewrite rule in the htaccess file for each account on my LiteSpeed server but I am getting errors reported in the logs. I believe this rewrite is ok in Apache.

Code:
RewriteCond %{QUERY_STRING} ^.* (globals|encode|request|union|select|insert|cast|set|declare|drop|update|md5|benchmark|loopback).* [NC,OR]
The errors I receive are:
[[HTAccess]] rewrite: '[' is expected while parsing: RewriteCond %{QUERY_STRING} ^.* (globals|encode|request|union|select|insert|cast|set|declare|drop|update|md5|benchmark|loopback).* [NC,OR]
[[HTAccess]] rewrite: invalid rewrite condition while parsing: RewriteCond %{QUERY_STRING} ^.* (globals|encode|request|union|select|insert|cast|set|declare|drop|update|md5|benchmark|loopback).* [NC,OR]


Should I be doing something different to help block these exploits?
 
Last edited by a moderator:

NiteWave

Administrator
#2
there is a extra space in the string:
^.* (globals
remove it and works.

it can be simplified as
Code:
RewriteCond %{QUERY_STRING} globals|encode|request|union|select|insert|cast|set|declare|drop|update|md5|benchmark|loopback [NC,OR]
 
Top