Forum Moderators: open
#SQL Injection Attempts
RewriteCond %{REQUEST_URI} ^.*(,|;|:|<|>|">|"<|\.\.\.).* [NC,OR]
#RewriteCond %{REQUEST_URI} ^.*(\=|\@|\[|\]|\^|\`|\{|\}|\~).* [NC,OR]
#RewriteCond %{REQUEST_URI} ^.*(\'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
##RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(\*|;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).* [NC]
RewriteRule ^(.*)$ - [F]
#End SQL Injection Attempts
#script xss insert
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{HTTP_REFERER} (\<|%3C).*script.*(\>|%3E)
RewriteRule ^(.*)$ - [F]
(\=|\@|\[|\]|\^|\`|\{|\}|\~)Brackets [ ] and (sometimes) carets ^ are reserved characters. The others aren’t, and do not need to be escaped. For that matter, what have you got against grouping brackets? [=\[\]^`{}~]