Sinisterly
[Htaccess ] sql injection prevent by htacces - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: PHP (https://sinister.ly/Forum-PHP)
+--- Thread: [Htaccess ] sql injection prevent by htacces (/Thread-Htaccess-sql-injection-prevent-by-htacces)



[Htaccess ] sql injection prevent by htacces - Shining White - 11-25-2012

Creditz to : phpBuGz

htacces checking each server url word if its match =' tick then
it wil redirect.
you can add block ip ,show 404 error .
what ever u want to do

very useful if dealing with huge sql records website

Code:
RewriteEngine on RewriteCond %{QUERY_STRING} [+,*/'] RewriteRule . - [F] RewriteCond %{QUERY_STRING} \%27 RewriteRule . - [F] RewriteCond %{QUERY_STRING} \%5C RewriteRule . - [F]

you can add custom string also


Eg:
RewriteCond %{QUERY_STRING} \order
RewriteRule . - [F]


Shared it , coz seem useful Smile


RE: [Htaccess ] sql injection prevent by htacces - LightX - 11-25-2012

Ooh, thanks for the share! Smile


RE: [Htaccess ] sql injection prevent by htacces - josefsat - 11-25-2012

Ooh, thanks for the share!


RE: [Htaccess ] sql injection prevent by htacces - Shining White - 11-26-2012

(11-25-2012, 10:23 PM)josefsat Wrote: Ooh, thanks for the share!

if you spam in my thread one more time , :headbash: