Forum Moderators: phranque
Following up on jdMorgan's post at:
[webmasterworld.com...]
He posted the code:
RewriteCond %{QUERY_STRING} [^a-z](declare¦char¦set¦cast¦convert¦delete¦drop¦exec¦insert¦meta¦script¦select¦truncate¦update)[^a-z] [NC]
RewriteRule (.*) - [F] Would this also block URLs such as:
index.php?name=delete
exec.php etc...?
Also note that the [NC] flag makes the string comparison case-insensitive.
It's impossible to recommend a perfect coded solution for every site, and these attacks may have changed in the year since that old thread was posted. You should think about what the code means in relation to your site, your URLs, your query strings, and the 'attacks' that you are seeing, and adapt the code as needed.
Jim